Document Structure Elements

Every XHTML document has three major components: the XHTML declaration, the head, and the body. The document structure elements are those that define each component.

<html>

Type:

Container

Function:

Declares the document to be an XHTML document. All document content and supporting XHTML code goes between the <html> and </html> elements.

Syntax:

<html> ... </html>

Attributes:

The <html> element can take the xmlns attribute, which specifies the URL that describes the XML namespace for the document (for example, xmlns="http://www.w3.org/1999/xhtml").

Example:

<html>
... all content and XHTML code goes here ...
</html>

Related Elements:

Although the <html> element is typically the first element in a document, it is ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.