Chapter 9. Cascading Style Sheets

Style sheets are the way publishing professionals manage the overall “look” of their publications—backgrounds, fonts, colors, etc. Most desktop publishing software supports style sheets, as do the popular word processors.

From its earliest origins, HTML focused on content over style. Authors were encouraged to provide high quality information, and leave it to the browser to worry about presentation. We strongly urge you to adopt that philosophy in your HTML documents.

However, while use of the HTML <font> tag and related attributes like Wcolor produce acute presentation effects, style sheets, when judiciously applied, bring consistency and order to documents. Style sheets let the HTML author control the presentation attributes for all the tags in a document or a whole collection of many documents, and from a single master style sheet.

In early 1996, the World Wide Web Consortium put together a draft proposal defining Cascading Style Sheets (CSS) for HTML. This draft proposal quickly matured into a recommended standard, which the commercial browser manufacturers were quick to exploit. Internet Explorer 4.0, introduced in the fall of 1997, implements most of the W3C standard. Netscape Navigator has some support for style sheets in Version 4.0, which was introduced in the spring of 1997. Style is fast achieving parity with content on the World Wide Web.

Since we realize that eventual compliance with the W3C standard is likely, we’ll cover all the components ...

Get Webmaster in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.