The background attribute of the <BODY background=imageURL> tag refers to the location of the image file to be used as the background image.

Click here to review how the following document appears in a Web browser.

<HTML>
<HEAD>
<TITLE>Enter the Page Title Here</TITLE>
</HEAD>
<BODY background="images/back_pict.jpg">
This page includes a background image. Make sure that your background image will not interfere the visions of your visitors from reading the text on the page.
</BODY>
</HTML>

 

The bgcolor attribute of the <BODY bgcolor=value> tag sets the background color of a Web page.

The value of the bgcolor attribute is either a predefined color or the corresponding hexadecimal representation.

Some of the popular predefined colors include: black, red, blue, green, white, cyan, magenta, and yellow.

Color
Hexadecimal Value
Color
Hexadecimal Value
Black
#000000
White
#FFFFFF
Red
#FF0000
Cyan
#00FFFF
Blue
#0000FF
Magenta
#FF00FF
Green
#00FF00
Yellow
#FFFF00

Click here to review how the following document appears in a Web browser.

<HTML>
<HEAD>
<TITLE>Enter the Page Title Here</TITLE>
</HEAD>
<BODY bgcolor="red">
This page uses black text on a red background.
</BODY>
</HTML>

 

Similarly, the text attribute of the <BODY text=value> tag sets the body text color of a Web page.

Click here to review how the following document appears in a Web browser.

<HTML>
<HEAD>
<TITLE>Enter the Page Title Here</TITLE>
</HEAD>
<BODY bgcolor="red" text="white">
This page uses white text on a red background.
</BODY>
</HTML>

It is also possible to change the colors used to represent hypertext links by assigning values to the link (i.e., unvisited link), vlink(i.e., visited link), and alink (i.e., active link) attributes.