Introduction to CSS Syntax

Each formatting instruction that you declare in your CSS document is defined as a CSS rule The process of designing your unique web site look and feel is creating enough CSS rules in order to implement your design concept to its completion.

Listing 1: Introduction to CSS Syntax
Basic format of a CSS Rule:
                        selector { property: value; }
CSS rule
A CSS rule consists of two parts: the first is a selector and the second is a declaration block. In Listing 1 the declaration block is highlighted in yellow and enclosed withing the curly braces {}.
declaration block
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a CSS property name and a value pair, separated by a colon.
A CSS selector is the part of a CSS rule set that actually selects the content you want to style.
A CSS property is the part of a CSS rule set that selects the character or quality of the selector such as color, height, weight, etc.
A CSS value is the part of a CSS rule set that specifies the numerical worth of the selectors property. In this case it is the number or numbers that represent the selectors property setting that you desire in you web page design.