This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standard_personals. It's free and painless.
Dave | 29 December, 2004 16:46
One of the most popular requests we get is "How do I add some color to my Web Pages?"
Actually it's quite easy as far as HTML goes. It requires a small addition to the "body" tag at the beginning of your web page as shown below.
<html>
<title>Color Tutorial</title>
<body bgcolor="#FFFF00">
Color Values
Colors are defined using a hexadecimal notation for the combination of Red, Green, and Blue color values (RGB). The lowest value that can be given is 0 (hex #00), the highest is 255 (hex #FF).
Hexadecimal Color names are six digit codes used to specify how much of the colors RED, BLUE, and GREEN are being used.
Here are the hexadecimal codes for some of the most common colors:
#000000 BLACK
#FFFFFF WHITE
#FF0000 RED
#00FF00 GREEN
#0000FF BLUE
#00FFFF CYAN
#A020F0 PURPLE
#FFA500 ORANGE
#FFFF00 YELLOW
#A52A2A BROWN
You can also specify some colors by name. Color names are supported by newer versions of both Netscape and Internet Explorer.
Only 16 color names are supported at present (aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow). For all other colors you should use the HEX value.
In the top example I showed how you can change the background color, below is an example of how to change the color of your font. You can use the color's name in your font tag like this:
<FONT COLOR="purple"> Your Text </FONT>
or as a Hex code:
<FONT COLOR="#A020F0"> Your Text </FONT>
Web Safe Colors
A few years ago, when most computers supported only 256 different colors, a list of 216 Web Safe Colors was suggested as a Web standard. This is not as important now, since virtually all computers are equipped with the ability to display millions of different colors.
Of course it's better to control the color of your page and fonts using a style sheet - I'll post more about how to that in future blogs.
| « | September 2008 | » | ||||
|---|---|---|---|---|---|---|
| Su | Mo | Tu | We | Th | Fr | Sa |
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | ||||