Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- 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 these tags.
All attributes to this tag define document wide properties and display
characteristics.
- Attributes
- Alink
- 2 | 3
| 3.2 | IE
| M | N1.1
- 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
- Values:
An RGB triplet or a special
Color name.
- Background
- 2 | 3
| 3.2 | IE1
| M2FB | N1.1
- 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:
Either a absolute or relative URL indicating the location of the graphic.
- BGColor
- 2 | 3
| 3.2 | IE1
| M2FB | N1.1
- 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.
- Values:
An RGB triplet or a special
Color name.
- BGProperties
- 2 | 3
| 3.2 | IE2
| M | N
- Required? No
- 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.
- Values: Fixed
- LeftMargin
- 2 | 3
| 3.2 | IE2
| M | N
- Required? No
- Description:
This attribute gives the author control over the amount of space devoted
to the left margin of the browser window.
- Values:
Specified in pixels with integer values of 0
or greater.
- Link
- 2 | 3
| 3.2 | IE1
| M2FB | N1.1
- Required? No
- Description:
This attribute indicates the default color of hyperlinks that have not yet been
activated.
- Values:
Either an RGB triplet or a special
Color name.
- Text
- 2 | 3
| 3.2 | IE1
| M2FB | N1.1
- 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.
- Values:
Either an RGB triplet or a special
Color name
- TopMargin
- 2 | 3
| 3.2 | IE2
| M | N
- Required? No
- Description:
This attribute gives the author control over the amount of space devoted
to the top margin of the browser window.
- Values:
Specified as pixels with integer values of 0
or greater.
- VLink
- 2 | 3
| 3.2 | IE1
| M2FB | N1.1
- Required? No
- Description:
This attribute indicates the default color of hyperlinks that have already
been activated.
- Values:
Either an RGB triplet or a special
Color name.
Event Handler Attributes
[For more information on Event Handlers, please see the
SCRIPT page.]
- onLoad
- 2 | 3
| 3.2 | IE3B1
| M | N2B3
- Required? No
- Description:
This attribute executes Script code with the completion of a window's
loading or when all frames within a Frameset have finished loading. In
a Frame document scenario, an onLoad event in the BODY tag of a sub-frame
will occur before an onLoad event within the parent FRAMESET tag.
- Values:
Script statements or an external function call.
- onUnload
- 2 | 3
| 3.2 | IE3B1
| M | N2B3
- Required? No
- Description:
An unLoad Event Handler executes Script code when the user exits a
document. In a Frame document scenario, an onUnload event in the BODY
tag of a sub-frame will occur before an onUnload event within the
parent FRAMESET tag.
- Values:
Script statements or an external function call.
Style Sheet Attributes
[More on Cascading Style Sheets]
- Class
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This represents an assigned semantic classification grouping(s) for the
current tag.
- Values:
Given as a comma separated list of alphanumeric characters. Class names
may contain spaces (multiple consecutive spaces treated as a single
space.)
- ID
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This assigns an alpha-numeric identifier that is unique
to this tag instance. Style sheets may use this attribute to reference
the current instance of this tag. Hyperlinks may also use this identifier
to serve as a destination.
- Values:
An alphanumeric string - initial character must be a letter followed
by alphabetic characters, digits, "-" or "."
characters. The allowable set of alpha-characters is restricted to the
A-Z and a-z set.
- Style
- 2 | 3
| 3.2 | IE3B1
| M | N4B3
- Required? No
- Description:
This attribute is a text string that provides rendering style
information for the current tag.
- Values:
Please see the description of
inline styles for more
information on how to use this attribute and its
possible values.
- Example
- <html>
<head>
<title>this is the document title<
title>
</head>
<body
BACKGROUND="image.gif"
BGPROPERTIES="fixed"
TEXT="#ff0000"
LINK="#ffff00">
document text
</body>
</html>
- Parent Model
- <html> |
<noframes>
- Content Model
- %Text% |
%Anchors% |
%Virtual Formatting% |
%Physical Formatting% |
%Line Break Content% |
%Multimedia Content% |
%Block Content% |
<address> |
<basefont> |
<Hx>
Tips & Tricks
- Because the BACKGROUND attribute requires an extra HTTP request,
download time will be increased.
- Support for some of the attributes to BODY is still spotty. Most commonly
supported (thus safer) attributes are Background, BGColor, Link, Text, and
VLink.
- 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.)
Browser Peculiarities
- Some browsers may not display any of the page until the BACKGROUND
image download has completed.
- 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.)
- 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. The HTML 3.2 Draft includes ALINK now as an official attribute to
BODY. It will be interesting to see how the adoption of it progresses.
- 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.
Boring Copyright Stuff...