Sample Style Sheet Usage

If you set properties of the document body, they are inherited by all its child tags. For example, the background of this document is teal. Style information can be included in three ways:

Inherited style properties can be overridden by more specific declarations. For example, this paragraph has been given a fuchsia background, instead of inheriting the teal of the body.

Multiple style descriptions can be accessed through the class characteristic. This paragraph tag includes the characteristic class="alt", which directs the browser to use the style descriptions for p.alt. This gives the paragraph a navy background and white text.