Cascading Style Sheets

As the name implies, CSS involves more than just the use of a style sheet. Why a style sheet? What do cascading style sheets do?

Style Sheets

The aim of style sheets is to provide definitions of styles which are applied to the content, according to its role as a structural elements. A single headings, eg, could be in large bold text on one person's screen, in red on another's and read in a gruff voice to a third user.

As the W3C team say in their techniques guide,

"Style sheets should be used to control layout and presentation wherever possible in a document. CSS1 and CSS2 allow authors to duplicate almost every HTML 4.0 presentation feature and offer more power with less cost. However, until most users have browsers that support style sheets, not every presentation idiom may be expressed satisfactorily with style sheets. Until support is adequate:

We recommend to all that they learn to use style sheets as soon as possible - whether for web pages or the range of other kinds of documents with which they might work.

Cascading Style Sheets

The idea is to have different style sheets for different purposes, including for different devices. It is handy if what is displayed on a screen is fitted neatly to a printer's output page. This example involves two style sets: one for the screen and one for the printer.

Within an organisation producing material for the web, there may be a house-style, a departmental style and a personal style that users want applied to their material. In addition, there may be a particular way that a web browsing user needs to have web material presented for their access device. The information about the styles to be applied can be contained within the webpages, imported, or in the user's browsing device's software.

CSS 2 provides rules as to which of these styles dominates in what situation. Fortunately, the ultimate decision now rests with the user who changes the settings of their browser to use their chosen styles.


Copyright Liddy Nevile 19 March 2001. This material may be copied if source is acknowledged.