This is the real essential for every single newcomer. CSS syntax is easy to understand, and I hope I’ll make it clear to you. Here I have three basic examples of CSS rules.
Inline declaration:
span { color: red; }
Multi-line declaration:
span { color: red; }
Description
- span
- selector (in this case, we are talking about type selector)
- { … }
- declaration space (only rules in curly bracket after selector, will apply on selected element(s))
- color
- property
- red
- attribute
* after declaration of all attributes of given property, we use “;” which says that we are done with the declaration of the property.