HTML and CSS Reference
In-Depth Information
Chapter 8. Cascading Style Sheets
Stylesheets are the way publishing professionals manage the overall
"look" of their publicationsbackgrounds, fonts, colors, and so onfrom a
single page to huge collections of documents. Most desktop publishing
software supports stylesheets, as do popular word processors, so using
stylesheets for HTML documents is obvious.
For the most part, HTML focuses on content over style. Authors are en-
couraged to worry about providing high-quality information and leave it
to the browser to worry about presentation. We strongly urge you to ad-
opt this philosophy in your documentsdon't mistake style for substance.
However, presentation is for the benefit of the reader, and even the
original designers of HTML understand the interplay between style and
readabilityfor example, through the physical style and header tags.
Stylesheets extend that presentation with several additional effects, in-
cluding colors, a wider selection of fonts, and even sounds so that users
can better distinguish elements of your document. But most importantly,
stylesheets let you control the presentation attributes for all the tags in
a documentfor a single document or a collection of many documentsfrom
a single master.
In early 1996, the World Wide Web Consortium (W3C) put together a
draft proposal defining Cascading Style Sheets (CSS) for HTML. This draft
proposal quickly matured into a recommended standard. In mid-1998,
the W3C extended the original specification to create CSS2, which in-
cludes presentation standards for a variety of media besides the familiar
onscreen browser, along with several other enhancements.
The W3C continues to work on a minor version upgrade (version 2.1) and
a draft of CSS3, but these are not imminent. Indeed, no current browser
or web agent fully complies with the CSS2 standard. However, because
we realize that eventual compliance with the W3C standard is likely, we'll
cover all the components of the CSS2 standard in this chapter. As always,
we'll denote clearly what is real, what is proposed, and what is actually
supported. [*]
Search WWH ::

Custom Search