body ElementThe body element is declared by the XHTML 1.1 Structure Module
Elements in the Structure Module are:html | head | title | body
The body element is the container for all the visible content on the page and comes immediately after
the head element. The world is pretty much your oyster with this one,
just remember that only block level elements (and comments, scripting and whitespace) may be children of body.
All inline elements and #PCDATA must have a containing block level element.
See the Content Model for a list of allowable children.
The example below shows a very simple body element. Note that the image cannot validly be
placed as a child of body but must be enclosed within a block level element, in this case
div. Remember to enclose your body element within the correct
html element structure.
<body>
<h1>My Interesting Page about Hippos</h1>
<div class="intro">
<p>Hippo is short for hippopotamus which means 'river horse' in Greek.
In Latin, I therefore believe the hippo would be called "Equus Fluminis".</p>
<p>The hippo is an artiodactyl ungulate and the common hippo has
the binomial name (Genus and Species) of "Hippopotamus amphibius".</p>
</div>
<div class="image">
<img src="hippo.jpg" width="400" height="300" alt="[Image: A Hippo with its calves]" />
</div>
</body>
There are no #REQUIRED attributes on the body element.
onload [ type Script ]onunload [ type Script ]body element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
body element is:
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
bodyaddress, blockquote, div, h1 - h6, p, predl, ol, ultablefieldset, formhrnoscript, scriptdel, insbodyhtml