CSS1 allows content developers to duplicate most HTML 4.0
presentation capabilities 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. We also provide examples of how to use HTML 4.0
features (e.g., tables, bitmap text) more accessibly when they must be
used.

This section describes the status of this document at the time
of its publication. Other documents may supersede this document. The
latest status of this document series is maintained at the W3C.

While Web Content Accessibility Guidelines 1.0 strives to be a stable document (as a W3C
Recommendation), the current document is expected to evolve as
technologies change and content developers discover more effective
techniques for designing accessible Web sites and pages.

This is a W3C Working Draft for review by W3C Members and other
interested parties. It is a draft document and may be updated,
replaced or obsoleted by other documents at any time. It is
inappropriate to use W3C Working Drafts as reference material or to
cite them as other than "work in progress". This is work in
progress and does not imply endorsement by, or the consensus of,
either W3C or participants in the Web Content Accessibility Guidelines
(WCAG) Working Group.

Here are guidelines for creating style sheets that
promote accessibility:

Use a minimal number of style sheet for your site

If you have more than one, use the same "class" name for the same
concept in all of the style sheets.

Use linked style sheets rather than embedded styles, and avoid
inline style sheets.

Content developers should not write "!important" rules. Users should
where necessary.

Use the "em" unit to set font sizes.

Use relative length units and percentages. CSS allows you to
use relative units even in absolute positioning.
Thus, you may position an image to be offset by "3em" from
the top of its containing element. This is a fixed distance,
but is relative to the current font size, so it scales
nicely.

Only use absolute length units when the physical characteristics of
the output medium are known.

Always specify a fallback generic font.

Use numbers, not names, for colors.

Provide a text equivalent
for any important image or text generated by style sheets
(e.g., via the 'background-image', 'list-style', or 'content'
properties). Note.
Text generated by style sheets is part of the document
source and will not be available to
assistive technologies that access content through
DOM, level 1 ([DOM1]).

Be sure to validate
that your pages are still readable
without style sheets.

Some examples follow.

Example.

Use em to set font sizes, as in:

H1 { font-size: 2em }

rather than:

H1 { font-size: 12pt }

End example.

Example.

Use relative length units and percentages.

BODY { margin-left: 15%; margin-right: 10%}

End example.

Example.

Only use absolute length units when the physical characteristics of
the output medium are known.

Instead of using deprecated presentation
elements and attributes , use the many CSS properties to control
font characteristics: 'font-family', 'font-size',
'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
and 'font-weight'.

The following CSS2 properties can be used to control
font information: 'font', 'font-family', 'font-size', 'font-size-adjust',
'font-stretch', 'font-style', 'font-variant', and 'font-weight'.

Use them instead of the following deprecated font elements and
attributes in HTML: FONT,
BASEFONT, "face", and "size".

If you must use HTML elements to control font information, use
BIG and SMALL, which are not deprecated.

Underlines, overlinks, blinking: 'text-decoration'.
Note. If blinking content (e.g., a headline
that appears and disappears at regular intervals) is used,
provide a mechanism for stopping the blinking. In CSS,
'text-decoration: blink' will cause content to blink and will
allow users to stop the effect by turning off style sheets
or overriding the rule in a user style sheet.
Do not use the BLINK and MARQUEE
elements. These elements are not part of any W3C specification for
HTML (i.e., they are non-standard elements).

Content developers should use style sheets to style
text rather than representing text in images. Using
text instead of images means that the information will be
available to a greater number of users (with speech synthesizers,
braille displays, graphical displays, etc.). Using style sheets
will also allow users to override author styles and change colors
or fonts sizes more easily.

The following CSS2 properties can be used to control
the formatting and position of text:

Indentation: 'text-indent'.
Do not use the BLOCKQUOTE or any other structural element to indent
text.

Letter/word spacing: 'letter-spacing', 'word-spacing'.
For example instead of writing "H E L L O" (which
users generally recognize as the word "hello" but would hear as individual
letters), authors may create the same visual effect with the
'word-spacing' property applied to "HELLO".
Text without spaces will be transformed
more effectively to speech.

For link colors, refer to the :link, :visited, and :active
pseudo-classes.

Ensure that foreground and background colors contrast well. If specifying a foreground
color, always specify a background color as well (and vice versa).

Ensure that information is not conveyed through color alone. For
example, when asking for input from users, do not write "Please select
an item from those listed in green." Instead, ensure that
information is available through other style effects (e.g.,
a font effect) and through context (e.g,. comprehensive
text links).

For instance, in this document, examples are styled by default
(through style sheets) as follows:

They are surrounded by a border.

They use a different background color.

They begin with the word "Example" (or "Deprecated
Example".

They also end with the phrase "End example", but that
phrase is hidden by default with 'display: none'. For
user agents that don't support style sheets or when
style sheets are turned off, this text helps delineate
the end of an example for readers who may not be
able to see the border around the example.

Quicktest! To test whether your
document still works without colors, examine it with a monochrome
monitor or browser colors turned off. Also, try setting up a color
scheme in your browser that only uses black, white, and the four
browser-safe greys and see how your page holds up.

Quicktest! To test whether color
contrast is sufficient to be read by people with color deficiencies or
by those with low resolution monitors, print pages on a black and
white printer (with backgrounds and colors appearing in
grayscale). Also try taking the printout and copying it for two or
three generations to see how it degrades. This will show you where you
need to add redundant cues (example: hyperlinks are usually underlined
on Web pages), or whether the cues are two small or indistinct to hold
up well.

For more information about colors and contrasts, refer
to [LIGHTHOUSE].

Layout, positioning, layering, and alignment should be done through style
sheets (notably by using CSS floats and absolute positioning):

'text-indent', 'text-align', 'word-spacing', 'font-stretch'. Each
of these properties allows users to control spacing without adding additional
spaces. Use 'text-align: center' instead of the deprecated
CENTER element.

'margin', 'margin-top', 'margin-right', 'margin-bottom',
'margin-left'. With these properties, authors can create space
on four sides of an element's content instead of adding
non-breaking spaces (&nbsp;),
which are non-standard mark-up, to create space around an element.

'float', 'position', 'top', 'right', 'bottom',
'left'. With these properties, the user can
control the visual position of almost any element in a manner
independent of where the element appears in the document. Authors
should always design documents that make sense
without style sheets (i.e., the document should
be written in a "logical" order)
and then apply style sheets to achieve visual effects.
The positioning properties may be used to create
margin notes (which may be automatically numbered), side bars,
frame-like effects, simple headers and footers, and more.

The 'empty-cells' property allows users to leave
table cells empty and still give them proper borders on the
screen or on paper. A data cell that is meant to be empty should
not be filled with white space or a non-breaking space
just to achieve a visual effect.

The original draft of this document is based on "The Unified Web
Site Accessibility Guidelines" [UWSAG]]
compiled by the Trace R & D Center at the University of Wisconsin.
That document includes a list of additional contributors.