The most basic and smallest legal XHTML document contains the xml header,
the document type declaration, and only the required entities <html>,
<head>, <title> and <body>. This file is
shown below. If displayed in a browser, a blank page would appear with
only the title in the title bar, or whatever mechanism the browser uses
to display the title.
01: <?xml version="1.0" encoding="UTF-8" standalone="no"?> 02: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 03: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 04: <html xmlns="http://www.w3.org/1999/xhtml"> 05: <head> 06: <title>A minimal XHTML file</title> 07: </head> 08: <body> 09: </body> 10: </html>
The <body> portion of the document would be populated with the actual content of the page, but as the XHTML standard shows, there is no required content for a page, only a title is required and even it could be blank if you wanted it to be.
All XHTML documents begin looking like this, and in general what you stuff in the <body> tag will be your largest concern and focus. Many things can go into the body tag, but here we'll only cover a handful of them.
Since XHTML is a structured markup language, the goal of the tags is to define what the structure of the document is and leave the actual formatting and layout to the browser. Therefore, to as large a degree as possible, our markup focuses on the various structural parts of a document.