Click to return to the DHTML, HTML     
BLOCKQUOTE Element | BLOC...     BR Element | BR Object     DHTML Objects    
Web Workshop  |  DHTML, HTML & CSS

BODY Element | body Object


Specifies the beginning and end of the document body.

HTML Syntax

<BODY
    ALINK=color
    BACKGROUND=url
    BGCOLOR=color
    BGPROPERTIES=FIXED
    BOTTOMMARGIN=pixels
    CLASS=classname
    ID=value
    LANG=language
    LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT  | VBS 
    LEFTMARGIN=pixels
    LINK=color
    RIGHTMARGIN=pixels
    SCROLL=YES|NO
    STYLE=css1-properties
    TEXT=color
    TITLE=string
    TOPMARGIN=n
    VLINK=color
    event = script
>

Remarks

You can access the BODY element from script through the document object.

The window object for the BODY element can host event handlers for the onblur, onfocus, onload, or onunload events.

The BODY element is a block element and requires a closing tag.

This element is available in HTML as of Microsoft® Internet Explorer 3.0, and in script as of Internet Explorer 4.0.

Members

Styles

Example

This example exposes the BODY element in script.

var oBody = document.body;

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
document


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.