A style sheet consists of one or more rules that describe how page elements should be presented. Every rule has two fundamental parts: the selector and the declaration block. Figure 1-1 illustrates the structure of a rule.
On the left side of the rule, we find the selector, which selects the parts of the document to which the rule should be applied. On the right side of the rule, we have the declaration block. A declaration block is made up of one or more declarations; each declaration is a combination of a CSS property and a value of that property.
The declaration block is always enclosed in curly braces. A
declaration block can contain several declarations; each declaration must
be terminated with a semicolon (
;). The exception is the
final declaration in a declaration block, for which the semicolon is
Each property, which represents a particular stylistic parameter, is
separated from its value by a colon (
:). Property names in
CSS are not case-sensitive. Legal values for a property are defined by the property description.
Chapter 4 provides details on acceptable
values for CSS properties.