Home Advertise with us Forum Articles Sitemap Contact
Logo  

HTML Colors

There are three basic methods of setting color in HTML. The very first & the simplest method being the use of Generic terms of colors like, blue, green, black, white, etc. The Generic colors are nothing but preset HTML coded colors, where the name of each color only serves as the value. The 16 basic colors specified for HTML & CSS include – navy, aqua, black, fuchsia, purple, blue, green, lime, teal, gray, maroon, olive, white, red, silver and yellow

The HTML coloring system is based on the use of hexadecimal (hex) notation for the combination of RGB (Red, Blue & Green). The lowest value that can possibly be assigned to any of these colors is 0 (hex 00) & the highest value that can be given is 255 (hex FF). These hexadecimal notations are written with a # sign followed by 3 double digit numbers.
Box containing color values & result

In HTML there exists a 216 cross-browser color palette known as "Web Safe" Colors"created in order to ensure that all colors would be displayed correctly in all computers.

#FFFF00 #FFFF33 #FFFF66 #FFFF99 #FFFFCC #FFFFFF
#000000 #000033 #000066 #000099 #0000CC #0000FF
#00CC00 #00CC33 #00CC66 #00CC99 #00CCCC #00CCFF
#330000 #330033 #330066 #330099 #3300CC #3300FF
#660000 #660033 #660066 #660099 #6600CC #6600FF
#990000 #990033 #990066 #990099 #9900CC #9900FF
#CC0000 #CC0033 #CC0066 #CC0099 #CC00CC #CC00FF
#CCCC00 #CCCC33 #CCCC66 #CCCC99 #CCCCCC #CCCCFF
#FF3300 #FF3333 #FF3366 #FF3399 #FF33CC #FF33FF
#FF9900 #FF9933 #FF9966 #FF9999 #FF99CC #FF99FF
 

HTML Tip 1

Use only hexadecimal #RGB values for colors. The behavior of named colors is browser-idiosyncratic and totally unpredictable.
 
 

HTML Tip 2

You can resize your images without a graphics program by changing the HEIGHT and WIDTH in your image tag.