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 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.