HTML Reference

The <body> Tag

The <body> marks the beginning of the part of your HTML document that is displayed in a browser, and sets default behavior of that page. The following table lists the attributes associated with the <body> tag:

bgcolor=colorUsed to set the background color; for example, to set a white background use bgcolor="#ffffff".
background=urlUsed to set a background image (wallpaper) for your web page, where URL is the URL of the image.
text=colorUsed to set the default text color; for example, to set the default text color to black use text="#000000".
link=colorThe color of hyperlink text that has not been visited before.
alink=colorThe color of hyperlink text while the mouse is pressed when the mouse is over that link.
vlink=colorThe color of hyperlink text for a page that has been visited before.

To put it all together in one example, the following body tag sets the default background color to white, the default wallpaper to myimage.gif, the default text color to black, the default unfollowed link to bright red, the default followed link to bright green, and the color of a link while being pressed to bright blue:

<body bgcolor="#ffffff" background="myimage.gif" text="#000000" link="#ff0000" vlink="#00FF00" alink="#0000FF">