Changing Colors
There are many ways to use color in web pages. There are default
colors that some browsers use, but you can use different ones in
your page if you want.
You can define colors for:
- Some of the text: <font color="#">
and </font>
- All of the text in the page: text="#"
- Links that haven't been clicked on: link="#"
- Links that have been clicked on: vlink="#"
- The background color of the page: bgcolor="#"
When you're ready to choose your colors, look at
VisiBone's helpful color chart.
Setting the color for some of the text
This sentence will be the normal color.
<font color="#FF0000">
This sentence will be red.</font>
This sentence will be the normal color.
This sentence will be red.
Setting the color for all of the text
To do this, put text="#" in the
<BODY> tag.
The Sample Page changes the default
text color.
The code in that case is:
<BODY text="#0000FF">
Setting the color for links that haven't been clicked on
To do this, put link="#" in the
<BODY> tag.
The Sample Page changes the default
for the color of those links.
The code in that case is:
<BODY link="#FF0000">
Setting the color for links that have been clicked on
To do this, put vlink="#" in the
<BODY> tag.
The Sample Page changes the default
for the color of those links.
The code in that case is:
<BODY vlink="#000000">
Setting the background color
If you have a background graphic, you don't need to set a background color.
To set the background color, put bgcolor="#"
in the <BODY> tag.
The background color for this page was set to white (#FFFFFF). The code
for this page is:
<BODY bgcolor="#FFFFFF">
Hints for using colors
- If you decide to change the default background, link, and text
colors, make sure that the new colors differ enough so that you
can read text on the background and tell when a link has been
visited or not. For example, you don't want to have blue text
on a blue background.
-
When you set the colors for your page, you don't need to have more than one
<BODY> tag. Everything can be put in the
same one. For instance, in the Sample Page,
the code for that tag looks like this:
< BODY background="whitebg.gif"
text="#0000FF"
link="#FF0000"
vlink="#000000">
[Table of Contents]
[More HTML]
[Next Page]
[Previous Page]
© 1996-2008 Suzanne Cook