HTML and CSS

The body Element

The body element is where all the action takes place. It's the element where you'll be placing the content of your page and marking it up using XHTML to structure it accordingly. The element goes within the html element, directly below the headmakes sense, doesn't it? (See Example 1-12.)

Example 1-12. Placing the body element
<html>
<head>
<title>Appropriate Title Text Here</title>
</head>
<body>
</body>
</html>

When viewed in a browser, the information within the body element is what is displayed in the browser window, also referred to as the viewport. This is the content area onlyno browser chrome (which refers to the browser's interface components, such as scrollbars and status bars). Figure 1-3 shows Google in a web browser. Only the displayed content is within the viewport.

Figure 1-3. Viewing body text within the browser viewport.