<BODY> and </BODY>

Description:

The <BODY> tag contains the body of the document. It must come after the </HEAD> (if a header is specified). Everything between the <BODY> and </BODY> is considered part of the document body.  This is the part of the document that is visible to the user.

Attributes:

alink="color"
The color used for active links on the page.
background="url"
The image file to be used as the background image of the page.
bgcolor="color"
The color for the background of the page.
bgproperties=FIXED
Creates a watermark, which means the background image does not scroll as the user moves down the page. Internet Explorer only.
class=class
Indicates that the body is to be formatted using the specified class.
dir=direction
Indicates the direction (right or left) that the text is to be displayed. Useful for languages which display left to right.
event=JavaScript
When event occurs, execute the specified JavaScript.
fontsize=size
Can create small, medium and large fonts as the default.  Default is medium.
lang="lang"
Indicates the language of the text within the document body.
leftmargin=n
Size of the left margin. Only valid for Internet Explorer. For Netscape, use MARGINWIDTH
link="color"
The color for the links on the page, which have not been visited and are not active.
marginheight=n
Set the margin for the top and bottom margin on the page. Ignored for Internet Explorer (use TOPMARGIN), used by Netscape.
marginwidth=n
Set the margin for the left and right margin on the page. Ignored for Internet Explorer (use LEFTMARGIN), used by Netscape.
vlink="color"
The color for links on the page which have been visited.
text="color"
The color for text on the page.
topmargin=n
Size of the top margin. Used by Internet Explorer, ignored by Netscape (use MARGINHEIGHT).

Examples:

<BODY bgcolor="#ff9996" link="#b30000" vlink="#ffbc79" background="bk1.jpg">
This is some text and stuff within the document
</BODY>

The page will be displayed in the color #ff9996, with links in #b30000 and visited links in #ffbc79. The image file "bk1.jpg" will be set as the background image (this file is contained in the same folder as the html page).

Tips:

  1. Be sure and specify both TOPMARGIN and MARGINHEIGHT for compatibility with both major browsers.

  2. Also specify LEFTMARGIN and MARGINWIDTH for the same reason.

  3. </BODY> should be the second to last line in your HTML document, just above the </HTML>.