What is a CSS rule?
A CSS rule is a statement that generally exists within a Cascading Style Sheet (CSS file), all CSS rules consist of three main sections, these sections are known as the: • selector • property • value The selector area of your CSS rule is the only section that sits outside the curly braces. The property sits inside the curly braces and the end of the property declaration is shown by the colon : Immediately after the colon follows the value, the value always finishes with a semi-colon ; The CSS syntax says that the semi-colon is optional after the final value in any given rule. I would ensure it is always in place, not least for the sake of consistency. The syntax of CSS is a flexible one, allowances are made for preferred writing style, as we can see from Listings 1 & 2. selector { property: value; } Listing 1: multi-line selector {property: value;} Listing 2: single line The difference in the two rules can be plainly seen. Listing 1 has the various sections of the rule set on multiple