< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >
Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class
<body> Description:
The <body> tag is the contents of the document. The only time an XHTML documen will not have a <body> tag is when it is a frameset.
<body> Web Browser Support:
- AvantGo Palm OS
- AvantGo Windows CE
- Firefox 1, 2
- Internet Explorer 2, 3, 4, 5, 6, 7
- Mozilla 1
- Netscape 2, 3, 4, 6, 7, 8
- Opera 3, 4, 5, 6, 7, 8, 9
- Safari 1, 2
- WebTV / MSNTV
- HTML 3.2, 4.0
- XHTML 1.0
Structure Module, Intrinsic Events Module, Legacy Module
<body> Attributes:
All attributes are optional unless indicated.
<body> End Tag:
<body> Contents:
CDATA.The <body> tag encloses the content that will display on the web page. The following tags are valid within the <body> tag:
a, abbr, acronym, address, applet, b, basefont, bdo, big, blockquote, br, button, center, cite, code, dfn, dir, div, dl, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, i, iframe, img, input, isindex, kbd, label, map, menu, noframes, noscript, object, ol, p, pre, q, s, samp, script, select, small, span, strike, strong, sub, sup, table, textarea, tt, u, ul, var
<body> Valid Context:
The <body> tag is valid within the following tags:
html, noframes
<body> Special Notes:
- While this tag is technically optional according to the specification, leaving it out may confuse some browsers. And the XHTML DTD expects it.
- Attributes that are deprecated in HTML 4.0 should be replaced with CSS (Cascading Style Sheets) where possible.
- A common error when indicating colors in the <body></body> tag is to leave out the #-sign on hexadecimal triplets. Some browsers recognize the triplets, while others attempt to assign that text to a named color value. This can result in strange colors displaying on the page.
More <body> Information
- How To Build a Basic Web Page
- Basic Tags for a Site
- Convert Body Attributes to CSS
- Should I Use a Body Tag with a Frameset?
< Previous | HTML 4.01 Tags / XHTML 1.0 Elements | Next >
Free XHTML 1.0 Class | HTML Validators | Free HTML 4.01 Class

