Change the color of the underlying page

Each HTML file has a definite structure (click: HTML STRUCTURE) and the background of any page is controlled by the HTML TAG, <BODY> (click: HTML TAGS). For example, suppose we wish to have a yellow background of a page. We would use the HTML TAG:

<BODY BGCOLOR=#FFFF66>

For the moment, don't worry about the #FFFF66. This is just the code a particular shade of yellow (click: COLORS). So, let's look at a full page that has a shade of yellow as a background and blue letters. Click Here. Note: see below for how to let surfer change background colors.

So, to have any color background you wish for you page you need to:

  1. Find the computer code for the color you want, e.g. #0066CC (shade of yellow).
  2. Use the HTML tag, <BODY BGCOLOR=#0066CC>

Click on COLORS on the left to see where to find the hex codes for every color.

If you wish to let the surfer change the background color 'ON THE FLY' let them select a color by using the form below. To see what this looks like go to Select BGcolor.

Note: if you use this code you can't have background="filename" in the tag as it will override the used of the background color. This is why the selection of a color below doesn't change the background color.

Here is the code:

<form>Select a background color -> <select name="anynamehere"
onChange="document.bgColor =this.options[selectedIndex].value">
<option selected>Select A Color
<option value="FFFFFF" >White <option value="DDDDDD">Gray
<option value="FFFF00">Yellow
<option value="FFFF99">Pale Yellow
<option value="FF99FF">Lite Pink
<option value="FF66FF">Kind Of Red
<option value="FF0000">Dark Red
<option value="99FF00">Lite Green
<option value="66FF00">Dark Green
<option value="66FFFF">Lite Blue
<option value="3366FF">Dark Blue
<option value="000000">Black
</select>
</form>