BODY Element | body Object

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:
Version data is listed when the mouse hovers over a link, or the link has focus.
document

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.