back next

Background


To change the color of the background on a page, decide what color you want and then add an attribute to the <body> tag call bgcolor.

1. To use color names, simply use the name of the color as the value to bgcolor

    <body bgcolor=white>
    <body bgcolor=green>


2. To use color numbers for backgrounds. The value of the bgcolor attribute to <body> is the hexadecimal number.

    <body bgcolor=#ffffff>
    <body bgcolor=#934ce8>


    - The value of that color in RGB form, as three numbers (one for red, one for green, and one for blue - that's what RGB stands for) Click Here to see colors by hexadecimal value.
    #000000 = black #ffffff = white #ff0000 = red #00ff00 = green #0000ff = blue



Back to HTML tutor homepage | Back | Next | Email me