Help Index

Back to
geocities

html
Font Color

There are two ways to color text on the Web. One way is to set the colors for the entire document - specified in the body tag - and the other is to set and change colors as you move through the document, using the font tag. The body tag is often more practical than the font tag, and it's also supported by more browsers.

<body text=?> sets the font color
<body link=?> sets the color of links
<body vlink=?> sets the color of followed links
<body alink=?> sets the color of links on click
<font color=?> changes font color
</font> returns font to default color

Using the body tag, you can set the stage for your entire document, specifying the colors for regular text, links (normally blue), and followed links (usually red). Remember, however, that colors are specified using a numerical code. You can see many of the different codes by going to my color page.

If you type:

<body text=#9932cd link=#ff0000 vlink=#00ff00 alink=#000000>

You will get a nearly illegible, but correctly colored page, with green text and red links that turn black on click, and violet after they've been followed.

What if three colors aren't enough? Or what if you only want to color a single word? Lucky for you (and everyone else who is reading your page), Netscape's font tags let you do it. If you write in your HTML file:

<font color=#00ff00>green</font> with envy.

You'll get:

green with envy.

You could even change the color of individual letters, if you really wanted to:

You can even code in
<font color=#ff0000>T</font>
<font color=#ff7f00>E</font>
<font color=#ffff00>C</font>
<font color=#00ff00>H</font>
<font color=#0000ff>N</font>
<font color=#6b238e>I</font>
<font color=#9932cd>C</font>
<font color=#ff0000>O</font>
<font color=#ff7f00>L</font>
<font color=#ffff00>O</font>
<font color=#00ff00>R</font> 

Will give you:

You can even code in T E C H N I C O L O R

I'm not sure if it's worth the effort. The point is you can do it.

Review

TEXT
Changes the color of the text on the page. This is an overall change and can only be done once on a page.

LINK
Changes the color of the links you have on your page BEFORE a guest on your page "clicks" on them to visit.

ALINK
Changes the color of an Active Link, or how a link looks when it is being clicked.

VLINK
Changes the color of a Visited Link, or how a link looks to the guest if they have already been to that site.

Note: Make sure you don't leave the link colors unreadable on your colored background. If you are changing the background color or using a background image, make sure that your visitors can see your links and your text.

The values for some commonly used colors:

  • White "FFFFFF"
  • Black "000000"
  • Purple "FF00FF"
  • Yellow "FFFF00"
  • Gray "C0C0C0"
  • Yellow "FFFF66"
  • Red "FF0000"
  • Blue "0000FF"
  • Green "00FF00"
  • Lt. Purple "CC33FF"
  • Lt. Blue "00CCFF"

Also, the newer versions of MSIE and Netscape support the use of some color names rather than the RGB values. The supported color names are:

  • BLACK
  • WHITE
  • GREEN
  • MAROON
  • OLIVE
  • NAVY
  • PURPLE
  • GRAY
  • RED
  • YELLOW
  • BLUE
  • TEAL
  • LIME
  • AQUA
  • FUSCHIA
  • SILVER

Return to Help Index

mailbox ksv@earthling.net

Top | Home | Contents | Tutorials | On-Line Classes | Free Homepage | Graphics |
Publicize | Color Chart | Gadgets | Rings 'n Things | Awards |
Personal Help |