|
About Cascading Style Sheets
Cascading Style Sheets (CSS) are a collection of formatting rules
which control the appearance of content in a web page. With CSS
styles you have great flexibility and control of the exact page
appearance, from precise positioning of layout to specific fonts
and styles.
CSS styles let you control many properties that cannot be
controlled using HTML alone. For example, you can assign custom
list bullets and specify different font sizes and units (pixels,
points, and so on). By using CSS styles and setting font sizes in
pixels, you can ensure a more consistent treatment of your page
layout and appearance in multiple browsers. In addition to text
formatting, you can control the format and positioning of a
block-level elements in a web page. For example, you can set
margins, borders, float text around other text, and so on.
A CSS style rule consists of two parts—the selector and the
declaration. The selector is the name of the style (such as TR, or
P) and the declaration defines what the style elements are. The
declaration consists of two parts, the property (such as
font-family), and value (such as Helvetica). The term cascading
refers to your ability to apply multiple style sheets to the same
web page. For example, you can create one style sheet to apply
color and another to apply margins, and apply them both to the
same page to create the design you want.
A major advantage of CSS styles is that they provide easy update
capability; when you update a CSS style, the formatting of all the
documents that use that style are automatically updated to the new
style.
|
|