
W3C Core Styles
The W3C Core Styles offer authors an easy way to start using style sheets
without becoming designers. By adding a link in the head of your documents, a
CSS browser will fetch the style sheet of your choice from W3C's server when it
encounters your document. A non-CSS browser will display the HTML document like
it always did.
To start using the W3C Core Styles, do the following:
- Pick your favorite
style sheet from among the eight offerings: Chocolate, Midnight,
Modernist, Oldstyle, Steely, Swiss, Traditional, and Ultramarine.
- add a LINK elements to the head of your documents. Here is an example of
how to do this in HTML 4.01:
<!doctype html public '-//W3C//DTD HTML 4.01//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<title>Document title</title>
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Modernist" type="text/css">
</head>
...
or in XHTML 1.0:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html>
<head>
<title>Document title</title>
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Modernist" type="text/css" />
</head>
...
Check the HTML source of this page for a real example.
The W3C Core Styles have been designed and implemented by Todd Fahrner with
help from colleagues at (at that time) Verso
[link back to 1998]. This is an ongoing project to explore shared style
sheets over the Web, and we encourage you to start using the Core Styles. When
doing so, you should be aware that:
- Most HTML documents are not valid according to the HTML specification. Invalid
documents, in combination with the Core Styles, may lead to unexpected
results. W3C offers a way to validate
documents. Also, for best results, the HTML markup should be
non-presentational (avoid e.g. tables for layout, FONT tags, overuse of
<BR>, etc.) and structural (e.g. use H1-H6 for headings).
- As of August 2002, there are complete implementations of either CSS1, but not yet of CSS2. Most implementations have
problems handling certain CSS property/value combinations on certain markup
elements. Therefore, during a transition phase, we are using browser sniffing
to make sure browsers aren't sent style sheets that they can't handle. It
works like this: the W3C server detects what browser you are using (through
the User-Agent HTTP header field) and removes stylesheet modules which your
particular browser has problems with. This solution will be phased out as
browser support for CSS improves.
- For technical or aesthetic reasons, the W3C Core Styles may change over
time. However, the general look and feel of each style sheet will be
preserved.
Bert Bos, W3C Curator