Web Style Sheets
CSS tips & tricks

(This page uses CSS style sheets)

Alternative style sheets

A document doesn't need to have a single style sheet. You can give it a default style and any number of alternatives for the reader to choose from. This page, for example, has as alternatives all the W3C Core Styles, plus two style sheets found elsewhere on the Web (author: David Baron).

How the reader can select the alternatives depends on the browser. Not all browsers yet offer a menu for it, but in Netscape 6, for example, you can find all the styles under the menu "View" -> "Use Stylesheet".

To include extra style sheets, it suffices to add more <LINK> elements in the header, with the right REL and TITLE attributes, as follows. (I left out some of the styles; see the source of this document for even more links.)

  <link rel="stylesheet" title="Default" href="../main.css">
  <link rel="stylesheet" title="Default" href="../map.css">
  <link rel="stylesheet" title="Default" href="../headings-o.css">
  <link rel="stylesheet" title="Default" href="../banner-o.css">

  <link rel="alternate stylesheet" title="Oldstyle"

  <link rel="alternate stylesheet" title="Modernist"
  <link rel="alternate stylesheet" title="Steely"

  <link rel="alternate stylesheet" title="Forest (by David Baron)"

  <link rel="alternate stylesheet" title="Plain (by David Baron)"

Groups of links with the same TITLE are automatically combined into one style sheet.

CSS Valid CSS!Valid HTML 4.0!

Bert Bos
Last updated $Date: 2001/11/22 15:46:49 $ GMT
Make your own free website on Tripod.com