<font> tag is also used to change text colors. The syntax is the similiar. Only replace size by color.
<font color="green"> This is what you will see! </font>
If you replace the word green with blue, red, yellow or black, then the line in between will be displayed in that color. Try different colors to see which colors are accepted. Remember that you should only use lowercase letters for the colors. Below are some samples.
<font color="red"> +6 is thisbig </font>
<font size="blue"> +4is this big </font>
<font size="yellow"> +3is this big </font>
Suppose you want the yellow to be a slightly less brighter, or a shade which is a mix of red and blue. There are millions of colors and shades. We can't possibly name and recognize each and every one of them. There are more colors than words in the English language. Scientists have discovered long ago that, any color or shade discernible by human eye can be produced by the right combination of Red, Green and Blue. In computer world this is call RGB (short for Red, Green, and Blue). These RGB values can be used in HTML to specify a color. Computer scientists have come up with a nifty technique to represent 16,581,375 colors using six characters, two for each red, two for green, and two for blue in RGB. RGB is defined with hexadecimal values.
Computers use binary numbers (1 and 0) only. To simplify, hexadecimal (base 16) numbers are used. We are used to base 10 numbers meaning that there are 10 basic digits (0-9). Binary is base 2 meaning that there are two numbers ( 0 and 1 ). Since there is no digit after 1, the next number will be 10, 11, 110, and so on. Hexadecimal numbers are:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D,E, F
where A is 10 in base 10, B is 11 in base 10, and so on. This way 10 hex will be 16 in base 10. Now why am I suddenly talking about all this numbers mumbo jumbo. Don't worry if you do not understand it. The reason I mentioned this was to show you what A, B, C, D, E, and F mean and why they are used. All you need to know is that F is a larger number than E which is a bigger number than D and so on till A.
Let's look at the syntax of RGB:
<font color="#xxxxxx"> x can be any number between 0 and F </font>
The left two digits specify the redness, middle two digits specify the greenness, and the two digits on the right specify the blueness. FF is the most intense and 00 is the least. FF hexadecimal is equivalent to 255 in base 10. So we now have 255 x 255 x 255 = 16581375 possible combinations of colors and shades.
<font color="red"> is equivalent to <font color="#FF0000">
<font color="green"> is equivalent to <font color="#00FF00">
<font color="blue"> is equivalent to <font color="#0000FF">
As you can see, these are the maximum intensities of red, green, and blue that you can get. You can also use this around the heading tag to color it.
<font color="blue"><H3>You can also use RGB values</H3></font>
You can also change the color of the background of your web page.
<body font color="blue">
or
<body font color="#xxxxxx">
where x is any number. We can define both size and color in the same font tag. For example, we want a font size of +4 and the color to be blue.
<font size=+4 color="blue">DONKEY</font>
As you can see the word donkey is of size +4 and is blue.
Try this before you move to the next section.