BODY XHTML Element
The BODY element denotes the beginning and end of the document body. This is a block element and requires a closing tag.
Using this Element
There are some common properties and collections that apply to all the elements of the document object model, see Common Properties for All DOM Elements in Internet Explorer Mobile.
This element can be used within a web page with attributes.
This element can be used within scripts where it will have properties, events, methods and collections.
Attributes
Attribute | Value | PPC | SP | Description |
---|---|---|---|---|
ALINK | Special | Yes | Yes | This attribute indicates the color that a hyperlink assumes when it is activated or clicked on.
Note Link colors are disabled on grayscale devices resulting in link colors always being black. This attribute is equivalent to the CSS:
|
BACKGROUND | URL | Yes | Yes | Specifies the URL of a background image to be tiled behind the images and text on a page.
Note To improve readability, background images are disabled on grayscale devices and will not render. This attribute is equivalent to the CSS:
|
BGCOLOR | Special | Yes | Yes | Specifies the background color of the page. Values are specified in the format #RRGGBB where RR, GG and BB are hexadecimal values for red, green, and blue levels or can be specified by using one of the following color names listed below.
This attribute is equivalent to the CSS:
Note Background colors on the body are disabled on grayscale devices. The page will always have a white background. Color names:
|
CLASS | Yes | Yes | ||
ID | Yes | Yes | ||
LEFTMARGIN | 0...# | Yes | Yes | Specifies the left margin of the body in pixels. Negative values are allowed. The default value is 6.
This attribute is equivalent to the CSS:
|
LINK | Special | Yes | Yes | Specifies the color for links on a page. See BODY BGCOLOR for the format and possible color names.
Note Link colors are disabled on grayscale devices resulting in link colors always being black. This attribute is equivalent to the CSS:
|
ONLOAD | Yes | Yes | ||
ONULOAD | Yes | Yes | ||
RIGHTMARGIN | 0...# | Yes | Yes | Specifies the right margin of the body in pixels. Negative values are not supported. The default value is 6.
This attribute is equivalent to the CSS:
|
TEXT | Special | Yes | Yes | Specifies the color of the text on a page.
See BGCOLOR for the format and possible color names. Text colors are disabled on grayscale devices resulting in text always being black. This attribute is equivalent to the CSS:
|
STYLE | Yes | Yes | ||
TOPMARGIN | 0...# | Yes | Yes | Specifies the top margin of the body in pixels. Negative values are not supported. The default value is 6.
This attribute is equivalent to the CSS:
|
VLINK | Special | Yes | Yes | This attribute indicates the default color of hyperlinks that have already been activated.
Link colors are disabled on grayscale devices resulting in link colors always being black. This attribute is equivalent to the CSS:
|
Scripting Properties
This element has no scripting properties.
Scripting Methods
This property has no associated methods.
Scripting Collections
Collections | Arguments | Support | Comments |
---|---|---|---|
all | Yes | ||
length | long | read only | |
item | ([optional] variant name, [optional] variant index) |
Yes | |
anchors | Yes | This collection contains an array of anchor objects in the document. | |
length | long | read only | |
item | ([optional] variant name, [optional] variant index) |
Yes | |
forms | object | Yes | Collection of all FORM objects in the document in source order.
syntax:
|
length | long | read only | Contains the number of form objects in the collection.
To find the number of elements in a particular form object, use: |
item | ([optional] variant name, [optional] variant index) |
Yes | |
frames | object | Yes | |
length | long | read only | Always returns 0 on Smartphone
Note Windows Mobile-based Smartphones do not support frames. |
item | ([optional] variant name, [optional] variant index) |
Yes | |
links | object | Yes | Retrieves a collection all of the <A> (link) objects which have a HREF and all AREA objects in the document. |
length | long | Yes | Contains the number of elements in the links collection. |
item | ([optional] variant name, [optional] variant index) |
Yes | |
images | object | Yes | |
length | long | read only | |
item | ([optional] variant name, [optional] variant index) |
Yes |
Requirements
Pocket PC: Windows Mobile 5.0 and later
Smartphone: Windows Mobile 5.0 and later
OS Versions: Windows CE 5.01 and later
See Also
Send Feedback on this topic to the authors