Structure of CSS Rules
A Cascading Style Sheet is made up of one or more rules describing how webpage elements should be displayed. Every rule consists of three parts: a and a along with its . Together, the property and its value make up a
declaration.

Example 1 - Elements of a CSS Rule
The
selector is listed first. It indicates the element you want to affect. Example 1 uses the (header) HTML element. The
declaration(s) goes to the right of the selector. All the declarations in a rule must be enclosed within a single pair of curly braces { }. In the syntax of a declaration, the property is always separated from its value using a colon (:). More than one declaration may be included in a rule, however, and these are separated from each other by a semi-colon (;). For example: h1 {color: #CC0000; font-weight: bold}.
Property names are not case sensitive, so h1 and H1 are treated the same. However, XHTML and XML both require that all tags and attribute names be written in lowercase. So...for future compatibility, I suggest you just get used to using lowercase now. CSS doesn't care, and you won't have to try to remember when you can use which.
The rule in Example 1 above tells the browser that all text inside the tag should be red.
Coding Tip: The semi-colon isn't necessary after the last declaration in a list, but it doesn't hurt, either. Many people find it easier to simply include the semi-colon after every declaration, even if there is only one. Such as:
h1 {color: #CC0000;}
The choice is entirely up to the designer.