Web Design

Site Information

More Boogie Jack Sites

Add a Background Color to a Web Page

Adding a background color to your web pages is very easy. It's just a matter of modifying the...
<body>

...tag. The sample below shows a body tag with an attribute and value added to change the default background color to a different color.

<body bgcolor="#abc123"> 

In the above example, abc123 represents the hexidecimal code for the color you want. You can choose any combination of letters (A - F) or numbers (0 -9) and use them in any position in the hex code. The color code should always be enclosed in quotation marks ("...") and the hash sign (#) should precede the actual number/letter combinations. "FFFFFF" is pure white while "000000" (six zero's) is pure black.

You can also code some colors by their names instead of using a hex code. To use a color name leave out the hash mark. So a body background using a color name would look like:

<body bgcolor="red" > 

You can learn more about color usage and find a very helpful hex color utility and a named colors chart in the HTML Reference Charts section of this site. There are even better color utilities in my members-only site. You may want to learn about becoming a member.