Adding Color to Background


The bgcolor command can be used to change the color of your background using special codes that correspond to the different RGB colors. In the example shown below, the "#ffffff" gives a white background. The following URL provides you a comprehensive listing of these color codes:

http://www.infi.net/wwwimages/colorindex.html

Sample document with a background color:

<html>
<head>
<title>Adding Color to Background</title>
</head>
<body>
<body bgcolor="#ffffff">
<h2>This is an example of how to change the color of the background. 
In this case the background has been changed to white.</h2>
</body>
</html>

Show this document


Return to HTML Tutorial Menu