Basic Web Page Writing Step 17
Background And Foreground Colors
You have seen samples of the background and foreground colors in some of the sample pages in this guide.
This step will show you how to use these colorful options along with changing other parts of the doucment's colors as well.
To create a colored background or foreground, you need to include any of these options in the start body tag of your page. <START .....>
- For changing background color --- bgcolor="#number of color"
- For changing foreground color --- text="#number of color"
- For changing hypertext link color --- link="#number of color"
- For changing the hypertext link color that has already been visited --- vlink="#number of color"
Some Colors To Choose From
The number of the colors are in hexidecimal value of red-green-blue combinations to make up the color. There are many places on the web that can give you a complete color chart. One that I have found that allows you to test colors first is Mediarama's Color Page Builder. Also check out the Background Color Chart page or Thalia's Guide: Color Page
Here are a few colors you can use for now:
- Black = 000000
- White =FFFFFF -(can be used with a colored background)
- Yellow = FFFF66
- Red = FF0000
- Grey = CC9999
- Blue = 0000FF
- Green = 00FF00
- Purple = CC33FF
- Light Blue = 00CCFF
- Dark Blue = 000077
- Brown = AA0000
- Olive = 774400
To create a page that uses a Green Background, Red Text, Yellow Links and Light Blue for visited links the following would go in the first body tag at the top of your page.
<BODY BGCOLOR="#00ff00" TEXT="#FF0000" LINK="#FFFF66" VLINK="#00CCFF">
Lets Look at a finished Example
There really isn't much more than this to create colorful pages. Just remember that colors add to the time it takes to load a page and some browsers will display the colors differently. Also remember that some colors may be hard to read, so check them out carefully before you upload them to your server.
In step 18 you will see how to change the size of the text and also see how to select only parts of your text to color.
STEP 18 -- Font Sizes and Colors
created by Larry Curreri,
© 1996 l_curreri@yahoo.com
Visit My Home Page
last modified: January 14, 2002
This page hosted by
Get your own Free Home Page