Month 2 Week 4

Full Page Colors and Graphics

Changing Colors in HTML

Up until now, your pages have been black text on a white background. But that is boring, so today you'll learn how to add some color to your web page.

Start by opening your latest version of your page (test2.html or test3.html or similar). Use "Save as..." to save a new copy of your page as "testcolor.html".

Colors in HTML are listed by the amount of three colors - red, green and blue - that they contain. To confuse you even more, you don't just list those numbers. You have to convert the numbers into a special numbering system called "Hexidecimal" notation.

But don't worry - you don't need to know the RGB (red/green/blue) or the hexidecimal for any color to add it. Luckily, some nice people have put up very good graphics that show all 216 colors you can use in a web page.

Click here to open the color pallet, and then leave that window open as you continue to work.

Now look back at your testcolor.html page and find the <BODY> tag. You are going to add something to it, so that you have something like this -

<BODY BGCOLOR=#xxxxxx>

Replace the six x's with the combination of numbers and letters you see at the top of one of the color boxes on the pallet page and save your page.

Now, select a contrasting color and add it's six numbers/letters to the body tag like this -

<BODY BGCOLOR=#xxxxxx TEXT=#yyyyyy>

Don't forget to have the # before your letters/numbers, otherwise it won't work!

Save your page and then open it in your browser to see your new colors.

After you finish playing with various color combinations, click here to move on.

©2003, Gnosis 4-H Club
The 4-H name and 4-H logo are service marks protected under 18 U.S.C. 707.

Questions? Comments? Problems? Contact the Webmaster!


Home