Example A simple HTML document, with the minimum of required tags: <html> <head> <title>Title of the document<...
Example
A simple HTML document, with the minimum of required tags:<html> <head> <title>Title of the document</title> </head> <body> The content of the document...... </body> </html> |
Definition and Usage
The body element defines the document's body.The body element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
Browser Support
The <body> tag is supported in all major browsers.Differences Between HTML and XHTML
All "presentation attributes" of the body element were deprecated in HTML 4.01, and are not supported in XHTML 1.0 Strict DTD.Optional Attributes
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.Attribute | Value | Description | DTD |
---|---|---|---|
alink | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the color of the active links in the document. | TF |
background | file_name | Deprecated. Use styles instead. An image to use as the background. | TF |
bgcolor | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. The background color of the document. | TF |
link | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the color of all the links in the document. | TF |
text | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the color of the text in the document. | TF |
vlink | rgb(x,x,x) #xxxxxx colorname | Deprecated. Use styles instead. Specifies the color of the visited links in the document. | TF |
Standard Attributes
id, class, title, style, dir, lang, xml:lang |
Event Attributes
onload, onunload, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |