Annabella's HTML Help .... EZ PRINT!

COLOR

For the full version of this page, go to http://www.annabella.net/color.html

INTRODUCTION

There are two ways to specify colors within your webpage.....using Hexadecimal numbers or Color names.

Important note!....whenever you specify color in an HTML document, the word color MUST be spelt color. The English spelling, colour will not work!

HEXADECIMAL CODES

Colors are defined by a hexadecimal number or code, where the overall color is determined by its proportion of red, green,and blue.

Some examples of hexadecimal codes are:

#66FF00 #999966 #FF0000 #FF3300 #FF00FF
#0D0080 #8B008B #DAA520 #0F00CD #660033

Note: The 0 is the number 0, not the letter O.

To choose the hexadecimal color you wish to use, try my Color Palette at http://www.annabella.net/netscape.html This is a listing of the 216 Browser Safe Colors, showing your chosen color as a background, and also as text color.

WHY choose a Browser Safe Color when there are all those other lovely ones to use??

Well, many people surf the net with their browsers set to read only 256 colors. If you specify a color that is not one of the defined Browser Safe Colors, then their browser will display either the closest color, or a dithered (spotty) color.


COLOR NAMES

There are 140 defined color names available. However, they are only recognised by Netscape 3.0 and Internet Explorer 3.0 or better, and the viewer must have more than 256 colors available on their monitor. Most of these colors are not within the Browser Safe Color Palette.

Some examples of font colornames are:

PeachPuff Red OrangeRed CornflowerBlue Cyan
Green SpringGreen Purple Maroon Burlywood

To choose the color name that you wish to use, try my 140 Color Name Palette at http://www.annabella.net/colornames.html. This is a listing of the 140 Color Names, showing your chosen color as a background, and also as text color.


BODY COLORS

Body colors are those that are set as the basic colors for your page. They cover the colors of the background, text, links, visited links and activated links.
The body colors are not written individually, but are all set within one body tag.

For example....
<body bgcolor="#99CCCC" text="#000000" link="#993366" vlink="#000000" alink="#99CCDD>

or

or <body bgcolor="white" text="MidnightBlue" link="DarkMagenta" vlink="MediumOrchid" alink="DeepPink">

NOTE: You must only ever have ONE BODY TAG on your page, and it should be immediately after your </head> tag. If you have more than one body tag, or you have it in the wrong part of your page, then the page may not load correctly with some browsers!

You can change various pieces of text within your page to different colors as the need arises, but the body colors remain the major colors that you have selected for the rest of your page.

In the following examples,"#xxxxxx" is either the hexadecimal code, or the "colorname" for your chosen color.


BACKGROUND COLOR

bgcolor="#xxxxxx"
This code sets the background color for your page. If you have a background image, you can still select a background color for your page. This background color will show until the image file has loaded. It is a good idea to select a background color that is similar to your background image. That way, if for some reason the background image does not load, your page will still look "nearly" right!

TEXT COLOR

text="#xxxxxx"
This code sets the text color for your page. The normal default for text color is black. If you do not specify a text color, it will automatically default to black.

LINK COLORS


FONT COLORS

You can vary your colors at any time within your document by using
<font color="#xxxxxx">
The font color will remain changed until you close with </font>

For example,
Lets add some <font color="#ff0000">C</font>
<font color="#ffff33">O</font>
<font color="#00cc33">L</font>
<font color="#0000ff">O</font>
<font color="#990099">R</font>!

For more font variations....size and face....go to my Fonts Tutorial at http://www.annabella.net/fonts.html

TABLE COLORS

You can also vary your table background colors.

For a more detailed explanation of tables, please go to my Tables Tutorial at http://www.annabella.net/tables.html

www.annabella.net
© COPYRIGHT 1997-2001     A. RAMSDEN     All Rights Reserved