[Skip navigation] home | about MCU | Services | learn accessible web design | tips archive

contact   
RSS syndication for MCU   

Use HTML attributes, or CSS to set web page colors, but don't use both.

Here is a useful tip that I found while browsing the Accessibility Internet Rally 2003 Advanced Training website.

Use HTML attributes, or CSS to set web page colors, but don't use both.

For example, if you set the background colour in a table cell to black using an HTML attribute (e.g. bgcolor="#000000"), and used CSS to create contrasting white text (style ="color: #FFFFFF") - you will start getting emails from users who surf with style sheets off (or those using browser that don't support style sheets).

I haven't came across anyone yet who can read black text on a black background.

The tips archive is at: Weekly accessible Web Design Tips.

Register for your weekly accessible web design tip.

Contributed by Jim Byrne
Updated Wednesday 8 Oct 2003


Free weekly accessible web design tip

Register for your weekly accessible web design tip 
Email:


Comments

Thanks Jim, The AIR site provides a good tutorial. In addition to only specifying colours in html OR in styles (the later is of course prefered), it is essential to always specify a background colour if you change the text colour in order to avoid these contrast problems arising if the user changes their background colour. WRT reading black on black - my screen reader user colleagues have no trouble with this ;-) Andrew

Andrew Arch | Wed Oct 08 2003