CSS syntax rules
The CSS syntax consists of a set of rules. A rule, in turn, is comprised of 2 parts: the selector and the declaration block. The selector points to the element (or elements) you want to style, and declarations define what style you would like to apply.
For example, here's the rule to style all <h1>
headings with the 32px
font:
h1 {
font-size: 32px;
}
Each declaration ends with a semicolon (;
), and the declaration block must be surrounded by curly braces ({ }
).