Basic CSS

A CSS formatting rule consists of two parts--the selector and the declaration.

The selector is a term (such as P, H1, a class name, or an id) that identifies the formatted element.

The declaration defines what the style elements are.

In the following example, H1 is the selector, and everything that falls between the braces ({}) is the declaration:
H1 {
font-size: 16 pixels;
font-family: Helvetica;
font-weight:bold;
}

The declaration consists of two parts, the property (such as font-family) and value (such as Helvetica). In the previous CSS rule a particular style has been created for H1 tags: the text for all H1 tags linked to this style will be 16 pixels in size, Helvetica font, and bold.

The term cascading refers to your ability to apply multiple styles to the same element. For example, you can create one CSS rule to apply color and another to apply margins, and apply them both to the same text on a page. The defined styles "cascade" down to the elements on your web page, ultimately creating the design you want.