Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
Last active October 13, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitaljhelms/4208694 to your computer and use it in GitHub Desktop.
Save digitaljhelms/4208694 to your computer and use it in GitHub Desktop.
What makes up a CSS rule
,....................... (CSS RULE) ......................,
| |
| ,...., |
| (SELECTOR) --> | h1 | |
| `''''` |
| { |
| ,....................., |
| | ,......., ,....., | |
| (DECLARATION) --> | | color | : | red | | ; |
| | `'''''''` `'''''` | |
| `'''''^''''''''''^''''` |
| | | |
| (PROPERTY) (VALUE) |
| } |
| |
`'''''''''''''''''''''''''''''''''''''''''''''''''''''''''`
@digitaljhelms
Copy link
Author

  • CSS rules tell browsers how to render elements in an HTML document.
  • The selector "selects" the elements in an HTML document that are to be styled.
  • The declaration tells a browser how to style the element.
  • The property is the aspect of that element that you are choosing to style.
  • The value is the exact style you wish to set for the property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment