This is a legacy document, and retained on the site in order to avoid link rot. The content is likely no longer (a) accurate, (b) representative of the views and philosophies of current site management, or (c) up to date.

CSS Example: Highlight

Highlights with CSS

The question of whether CSS can coexist with HTML attributes arises frequently in the comp.infosystems.www.authoring.stylesheets newsgroup. A transitional DOCTYPE has been provided for authors who want to provide presentation suggestions for what may be referred to as 'legacy browsers', and the lists below show the use of CSS named colors used in conjunction with HTML's <STRONG> and <EM> attributes.

Use of this type of markup is entirely at the author's discretion, but authors might well be reminded that "Less is more". Overuse of highlighting or other emphasis may detract from the readibility of a page. Judicious use of emphasis is encouraged.

(1) If you don't understand the problem with this line, please review Warren Steele's essay, What's Wrong with the Font Element? which happens to apply in equal measure to background color declarations without text color declarations.

 These are the 16 color names mentioned in CSS1, with their sRGB values: Black= #000000Green= #008000Silver = #C0C0C0Lime = #00FF00Gray = #808080Olive= #808000White= #FFFFFFYellow = #FFFF00Maroon = #800000Navy = #000080Red= #FF0000Blue = #0000FFPurple = #800080Teal = #008080Fuchsia= #FF00FFAqua = #00FFFF

The question of whether CSS can coexist with HTML attributes arises frequently in the comp.infosystems.www.authoring.stylesheets newsgroup. A transitional DOCTYPE has been provided for authors who want to provide presentation suggestions for what may be referred to as 'legacy browsers', and the lists below show the use of CSS named colors used in conjunction with HTML's <STRONG> and <EM> attributes.

Sue Sims