HTML: The Definitive Guide

Previous Chapter 3 Next
 

3.7 The Document Body

The document body is the meat of the matter; it's where you put the contents of your document. The <body> tag delimits the document body.

The <body> Tag

Within HTML 2.0, the <body> tag has no attributes and is little more than a placeholder in your documents. Various browsers, as we'll see, have extended the tag to give greater control over your document's appearance.

Anything inside the <body> tag and its ending counterpart </body> is called body content. The simplest HTML document might have only a sequence of text paragraphs within the <body> tag. More complex documents will include heavily formatted text, graphical figures, tables, and a variety of special effects.

Since the position of the <body> and </body> tags can be inferred by the browser, they can safely be omitted from the document. However, like the <html> and <head> tags, we recommend that you include the <body> tags in your document to make them more easily readable and maintainable.

The various attributes for the <body> tag are explicitly nonstandard extensions to the language, supported by recent versions of Internet Explorer and Netscape, among other browsers. They give you some control over the document's appearance, such as its background, text, and hyperlink display colors. See Chapter 5, Rules, Images, and Multimedia, for details.

The latest version of Netscape (2.0) also implements a special type of HTML document in which you replace the <body> tag with one or more <frameset> tags. This so-called frame document divides Netscape's display window into one or more independent windows, each displaying a different document. We describe this innovation in Chapter 10.


Previous Home Next
The Document Header Book Index Text Basics
 


Banner.Novgorod.Ru