1st Site Free Step 3 - HTML Coding (Cont.)

16 Color Names

HTML Color Names

In addition to using the Browser Safe Colors discussed earlier to specify color, you can also use the 16 color names discussed below:

Color names and their hexadecimal values in HTML

Black black="#000000" Green green="#008000"
Gray gray="#808080" Lime lime="#00FF00"
Silver silver="#COCOCO" Olive olive="#808000"
White white="#FFFFFF" Yellow yellow="#FFFF00"
 red="#FF0000"  navy="#000080"
 maroon="#800000"  blue="#0000FF"
 purple="#800080"  teal="#008080"
 fuchsia="#FF00FF"  aqua="#00FFFF"

For example, the background color for this page can be coded in HTML as: <body bgcolor=white> or by using the hexadecimal value <body bgcolor="#FFFFFF">. In addition to your body bgcolor tag, you can also use color names with font, table, and bgcolor HTML Tags.

Most browsers will accept a wider set of color names. But, their use is not recommended by W3C (Colors). Color names are not case sensitive.

Color tips:

  • Colors can make Web pages more readable and can be one of the most important elements of a Website. But, always ensure that your foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen.
  • With the implemetation of HTML 4.0 by W3C (See: 'Notes on using colors'), the use of HTML elements and attributes for specifying color has been deprecated (declared obsolete). You are encouraged to use Cascading Style Sheets (CSS) instead.

What will happen if you use depreciated tags? Since literally billions of pages have already been created on the web, it's a sure bet that support for these tags and attributes will remain in the browsers for a long time to come. I'll bet they will never be removed.


If you find this Website useful, donate as little as a $1.00 through the Amazon Honor System to help me keep it free. Paying is fast and easy: just click the Pay now button to begin. Your credit card is secure. Your privacy is protected.



Return to top
Help me improve this page, please provide me your
suggestions or recommend a free new resource:

Suggestion or free resource


Back
Back



| Home | Plan | Design | Code | Upload | Test | Promote | Maintain |
| Search | Map | About this site | Privacy | Glossary | What's new? |


URL: http://www.1stsitefree.com/16color_names.htm

Bill Green
Copyright © 2001 - 2008


HTML 4.01 Checked! Valid CSS Document