Basic document structure

An XHTML-conforming document has a document element called Html:

<html>...</html>

This element has a fixed attribute value, giving the default namespace the value 'http://www.w3.org/1999/xhtml'.

The Html element encloses a Head element and a main Body element. Both are required. The header must contain a Title element, which is presented in the title bar of the browser. The Body element may contain any of a number of other elements but will often begin with the title repeated in a first-level-header element, H1. An Address element encloses details of the author of the document, and may be inserted at the end of the document, where it is displayed in italic, possibly indented or centred:

 <html> <head> <title>A Description ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.