HTML Colors

Computer Education, Training & Tutorial Resources - ComputerEducationWorld.com
Home » Free Computer Training and Courses » HTML for Beginners »

Html colors - it goes in the “body” tag at the beginning of your document. If you don’t have a “body” tag, you can put one right after your /title or /head tags. This can be seen in the example for this page .

<html>
<title>Color Tutorial</title>
<body bgcolor=”006633″ text=”FFFFFF” link=”DD0000″ vlink=”6600CC”>

Now you are ready to get colorful! There are five colors that you can specify - ones for the background, the text, links, followed links, and “active” links.

The numbers refer to the colors and there is a correlation - the first two digits are the amount of red, the second two are the amount of green, and the last two are the amount of blue in the selected color. for example, my “link” color has no blue or green (00 and 00) but has lots of red - DD. “What is DD? That isn’t a number!” Actually, it is - Mathematicians that wanted digits beyond 9 invented the use of hexadecimal form so that instead of counting 8,9,10,11,12… they could count 9,a,b,c,d,e,f,10,11,12… and fit more numbers in the ones slot. Therefore, FF is the highest value one can use with background colors. FFFFFF is total saturation, all the colors, or white and 000000 is total absence of color, or black.

It is even possible to make a single word, group of words or even letters different colors. The tag is as follows:

<font color=”ff0ff0″>Hello!</font>

This command prints the following:

Hi this is honey!

 the color assignment is the same as before - RGB (Red, Green, Blue) Triplet Hex code. This can even be used to make rainbow words - You simply put the color tags around each letter instead of each word - here is an example:

<BODY>
  <font color=”ff0000″>C</font><font color=”00FF00″>O</font><font color= “0000ff”>m</font><font color=”ffff00″>p</font><font color=”00ffff”>u</font><font color=”ff0000″>t</font><font color=”00FF00″>e</font><font color= “0000ff”>r</font>  <font color=”ff0000″>e</font> <font color=”00FF00″>d</font> <font color=”0000ff”>u</font> <font color=”ffff00″>c</font> <font color=”ffff00″>a</font> <font color=”00ffff”>a</font> <font color=”ff0000″>t</font> <font color=”00FF00″>i</font> <font color=”0000ff”>o</font> <font color=”ff0000″>n</font> <font color=”ff0000″>w</font><font color=”#6600FF”>o</font><font color=”#FF6600″>r</font><font color=”#339966″>l</font><font color=”#3366FF”>d</font>
  <font color=”##000000″>.</font><font color=”#CC0000″>c</font><font color=”#CC33FF”>o</font><font color=”#0033FF”>m</font>
 </BODY>

Gives you:

 Computer  e d u c a a t i o n world .com

In order to find the right color can take a lot of trial and error. Here below you will find a picture that has several different colors and their hexadecimal codes listed. Hope this was helpful!

• • •
 



captcha PHP Script Free PHP captcha script free php
Website Design by WebWalas.com