BODY HTML Element

The BODY element denotes the beginning and end of the document body. This is a block element and requires a closing tag.

Attributes

Attribute Value Description
ALINK Special Indicates the color that a hyperlink assumes when it is activated or clicked. Link colors are disabled on grayscale devices, and links are always black.
Note   Supported only for devices running Windows Mobile 2002 software or later.
BACKGROUND URL Specifies the URL of a background image to be tiled behind the images and text on a page. For improved readability, background images are disabled on grayscale devices and do not render.
BGCOLOR Special Specifies the background color of the page. Values are specified using the #RRGGBB format, where RR, GG, and BB are hexadecimal values for red, green, and blue levels. Using one of the following color names can also specify values:

aliceblue

antiquewhite

aqua

aquamarine

azure

beige

bisque

black

blanchedalmond

blue

blueviolet

brown

burlywood

cadetblue

chartreuse

chocolate

coral

cornflowerblue

cornsilk

crimson

cyan

darkblue

darkcyan

darkgoldenrod

darkgray

darkgreen

darkkhaki

darkmagenta

darkolivegreen

darkorange

darkorchidg

darkred

darksalmon

darkseagreen

darkslateblue

darkslategray

darkturquoise

darkviolet

deeppink

deepskyblue

dimgray

dodgerblue

firebrick

floralwhite

forestgreen

fuchsia

gainsboro

ghostwhite

gold

goldenrod

gray

green

greenyellow

honeydew

hotpink

indianred

indigo

ivory

khaki

lavender

lavenderblush

lawngreen

lemonchiffon

lightblue

lightcoral

lightcyan

lightgoldenrod-yellow

lightgreen

lightgrey

lightpink

lightsalmon

lightseagreen

lightskyblue

lightslategray

lightsteelblue

lightyellow

lime

limegreen

linen

magenta

maroon

medium-aquamarine

mediumblue

mediumorchid

mediumpurple

mediumseagreen

mediumslateblue

medium-springgreen

mediumturquoise

mediumvioletred

midnightblue

mintcream

mistyrose

moccasin

navajowhite

navy

oldlace

olive

olivedrab

orange

orangered

orchid

palegoldenrod

palegreen

paleturquoise

palevioletred

papayawhip

peachpuff

peru

pink

plum

powderblue

purple

red

rosybrown

royalblue

saddlebrown

salmon

sandybrown

seagreen

seashell

sienna

silver

skyblue

slateblue

slategray

snow

springgreen

steelblue

tan

teal

thistle

tomato

turquoise

violet

wheat

white

whitesmoke

yellow

yellowgreen

Note   Background colors are disabled on grayscale devices; the page always has a white background.
CLASS   Associates the element with a CSS style.
Note   Supported only for devices running Windows Mobile 2003 software or later.
ID   Uniquely identifies the element within a document.
Note   Supported only for devices running Windows Mobile 2003 software or later.
LEFTMARGIN 0...#

6 (default)

Specifies the left margin of the body in pixels. Negative values are allowed.
LINK Special Specifies the color for links on a page. Pocket Internet Explorer does not distinguish between visited and unvisited links. Link colors are disabled on grayscale devices, and links are always black.
ONLOAD   An event that occurs when the document body is loaded.
Note   Supported only for devices running Windows Mobile 2002 software or later.
ONUNLOAD   An event that occurs immediately before the document body is unloaded.
Note   Supported only for devices running Windows Mobile 2002 software or later.
RIGHTMARGIN 0...#

6 (default)

Specifies the right margin of the body in pixels. Negative values are not supported.
STYLE   Provides the definition of the CSS styles used for this element.
Note   Supported only for devices running Windows Mobile 2003 software or later.
TEXT Special Specifies the text color on a page. Text colors are disabled on grayscale devices; text is always black.
TOPMARGIN 0...#

6 (default)

Specifies the top margin of the body in pixels. Negative values are not supported.
VLINK Special Indicates the default color of already activated hyperlinks. Link colors are disabled on grayscale devices, and links are always black.
Note   Supported only for devices running Windows Mobile 2002 software or later.

Requirements

Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later

Last updated on Friday, April 22, 2005

© 2005 Microsoft Corporation. All rights reserved.

Send feedback on this topic to the authors.