This is a top level HTML document structure which encapsulates
and defines all content (text and images) in the document
structure; all document content should be contained within the BODY
element. All attributes to this element define document wide
properties and display characteristics.
Description:
This indicates the horizontal alignment of the content in this block
element relative to the browser window.
Values:Left
[DEFAULT] | Center
| Right
Alink
[2|3|3.2|4]
[X1|X1.1]
[IE4B1|M|N1.1|O7.11]
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
This attribute indicates the color that a hyperlink assumes when it is
activated or clicked on. This state is usually only temporary until the
activation event ends
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
This attribute specifies an image to be used in the background of the
document. If the referenced image is smaller than the browser window,
it will be tiled to fit and will scroll with the text on the page.
Values:CDATA.
[Either an absolute or relative URL indicating the location of the graphic.
All URLs should be URL encoded
where required.]
BGColor
[2|3|3.2|4]
[X1|X1.1]
[IE1|M2FB|N1.1|O2.1]
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
This attribute specifies the color of the document background and
allows control over background appearance without requiring the browser
to make an additional download of an image. If a BACKGROUND image
attribute is also present, the BGCOLOR specified will shine through regions
where the background image is transparent.
Description:
This attribute is dependent upon the BACKGROUND attribute for
proper operation. The only allowable value currently is
Fixed, and it indicates to the browser that
the specified background image will be watermarked in the browser window
[image will not scroll when the text scrolls.] If this attribute is absent,
the default scrolling behavior is used.
Description:
This attribute specifies whether or not the content of the element will
use normal HTML linebreaking conventions. If False, normal linebreaking
behavior is used. If set to True, the element will not wrap to the
rendering viewport unless explicit linebreaking elements are added.
Values:False
(DEFAULT), True
May also be used as a standalone attribute, in which case the value is treated as TRUE.
Description:
This controls whether or not a vertical scrollbar is rendered on the edge of the
document window.
Values:Yes [DEFAULT] | No
Text
[2|3|3.2|4]
[X1|X1.1]
[IE1|M2FB|N1.1|O2.1]
Standards Details:
Deprecated in HTML 4.x/XHTML 1.0. Dropped in XHTML 1.1 in favor of CSS.
Required? No
Description:
When this attribute is present it indicates the default color of the
document text. This color can be overridden locally by specifying a
FONT COLOR value.
DTD Note: HTML 4.0 has changed the interaction
behavior for the BODY element in relation to framed documents. Before
HTML 4.0, a frame specification document would contain a HEAD element and
a FRAMESET element. Backward compatible content would be contained within
the BODY tag, which was nested inside the NOFRAMES element, which was in
turn nested within the FRAMESET structure.
In HTML 4.0, the BODY element always remains at the top level, such that
a framed document structure consists of a HEAD element, followed by a
FRAMESET structure, followed by a BODY structure. It is unknown
if Netscape or Internet Explorer honor this or the expanded syntax for
NOFRAMES yet.
Because the BACKGROUND attribute requires an extra HTTP request,
download time will be increased.
Of the BODY attributes introduced in HTML 3.2, the ALINK attribute never
gained wide support. Recommend against using this attribute.
It is wise to specify a BGColor in addition to a BACKGROUND attribute.
It should be of sufficient contrast to the chosen color scheme in the
off chance of the background image not loading (Choosing a BGColor
similar to the dominant color of the background is a good choice.)
It is also wise to specify the text and link colors when the BGCOLOR
attribute is also specified. This is to ensure proper contrast is
maintained between these basic page elements.
Curious how many of the common BODY attributes map to CSS? Look
here for the answer.
Browser Peculiarities
Some browsers may not display any of the page until the BACKGROUND
image download has completed.
[Tests: 1,
2,
3,
4]
If the background image fails to download for any reason and no
BGColor is specified it is common practice for browsers not to apply
the other coloring attributes (this ensures readability with the
default browser color schemes.)
[Test]
Until each of their 4.0 Beta 2 versions, both Netscape and Internet
Explorer have not allowed an animated Gif to be used as a background
image. Sometimes only the first frame of the animation would be shown -
otherwise no image at all. Warning: even though
background animations are now possible, PLEASE exercise caution
in their use! This behavior could be many more times as annoying (and
headache causing =)) to readers than special effects such as BLINK or
MARQUEE ever have been.
The ALINK attribute is interesting in that Netscape created it along
with the other major BODY attributes for V1.1. The other BODY attributes
Netscape created were quickly adopted by other browsers except for this one.
[Test]
Early versions of Netscape 1.1 had a bug/feature whereby it was
possible to create a "shimmering" effect by specifying multiple
BODY tags in succession, each with its own BGColor value. As each BODY
tag was parsed it would display the specified color. This was fixed very
soon after it was found, but authors considered this a "feature"
for a while and its use spread for a time.
The Left/Top/Right/BottomMargin attributes in Internet Explorer control the
margins of the displayed document, NOT the margins of the parent
WINDOW.
Setting the MARGINHEIGHT and MARGINWIDTH values to zero may be the only way
in Netscape that an author can achieve seamless cross-frame images.
The HEIGHT and WIDTH attributes in Opera 4+ specify the desired dimensions
of the content in the BODY element within the display window - the
browser may not be able to honor this for a number of reasons.