O'Reilly logo

Platinum Edition Using XHTML™, XML, and Java™ 2 by Andrew H. Watt, Mike Morgan, Jim O'Donnell, Eric Ladd

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required