XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / body
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
HTML 4.01 | HTML 5 |
body
<body> ... </body>
The body element encloses a document’s content. The content can be presented visually, for example in a graphical browser window, or audibly, for example through a screen reader. A document can contain only one body element. In HTML documents, body is optional; XHTML documents must contain it.
Notes
All presentational attributes in the body tag are deprecated in (X)HTML and were removed entirely from HTML 5 in favor of stylesheets.
Start/end tag
HTML 4.01 and 5: Optional/Optional; XHTML: Required/Required
Attributes
Core, Internationalization, events; also: onload and onunload
Global HTML 5 attributes; also: onafterprint, onbeforeprint, onbeforeunload, onblur, onerror, onfocus, onhashchange, onload, onmessage, onoffline, ononline, onpagehide, onpageshow, onpopstate, onredo, onresize, onstorage, onundo and onunload
alink="#rrggbb"or"Farbname"Deprecated. Not available in HTML 5. Defines a link’s color while the mouse button is held down when clicking it.
background="URL"Deprecated. Not available in HTML 5. Defines the location of an image file used as the document’s tiled background.
bgcolor="#rrggbb"or"Farbname"Deprecated. Not available in HTML 5. Defines the document’s background color.
link="#rrggbb"or"Farbname"Deprecated. Not available in HTML 5. Defines the default color of all links in the document.
text="#rrggbb"or"Farbname"Deprecated. Not available in HTML 5. Defines the color of all text that has no specific styling and is not a link.
vlink="#rrggbb"or"Farbname"Deprecated. Not available in HTML 5. Defines the text color of links already visited in the document.
Example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML4.01/strict.dtd">
<html>
<head>
<title>Titel des Dokuments</title>
</head>
<body>
<p>Inhalt des Dokuments...</p>
</body>
</html>
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de