# CSS Declarations

Consist of a property name followed by a colon (:) followed by the property value followed by a semicolon (;)

color: #FF0000;

The property name never has a space. The value never has a space, but there are exceptions. See below.

# Tricky CSS Declarations

## font-family: Georgia, "Times New Roman", serif;

Font names are listed in the order in which you want the browser to apply them. In this case if the Georgia font cannot be applied, then use Times New Roman. If the browser cannot apply Times New Roman, then it applies whatever serif font is available to it. Font names that consist of multiple words are enclosed in "quotation marks". A comma and space separate each font name in the list. A generic font name such as serif or sans-serif is always listed last.

## padding: 0 10% 0 20%;

Padding, border, and margin each have 4 sides that are always referenced in a clockwise order (top right bottom left). While each side can be referred to with an individual property (padding-top, padding-right, padding-bottom, padding-left), the padding property by itself refers to all four sides with the value for each side listed in order separated by a space.

## margin: 10%;

When padding, border, or margin are listed with only one value, it applies to each of the four sides.

## border: red 1px thin;

The border property has three properties (color, thickness, and style) in addition to being able to be applied to four different sides. The border property (border: red 1px thin;) therefore, summarizes 12 (3 properties times 4 sides) different individual properties as follows:

border-top-color: red;

border-right-color: red;

border-bottom-color: red;

border-left-color: red;

border-top-size: 1px;

border-right-size: 1px;

border-bottom-size: 1px;

border-left-size: 1px;

border-top-style: thin;

border-right-style: thin;

border-bottom-style: thin;

border-left-style: thin;