Top Level Structure of XHTML5 Documents


What is the Top Level Structure of an XHTML5 Document?



An XHTML5 document is the XML serialization format of an HTML5 document. The top level structure of an XHTML5 document consists of three parts:

  • XML processing instruction - Provides XML version information and character set declaration.
  • Document type declaration - Provides the document type and version information.
  • Document root element - Provides the root element of the document: html. It must include the "xhtml" namespace definition.

The following tutorial sample shows you how the HTML5 document top level structure looks like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html xmlns="">
 (Second level structure)


Smallest Valid XHTML5 Document

Validating HTML5 Documents Online

Introduction of HTML5

⇑⇑ HTML Tutorials

2024-03-17, 1090🔥, 0💬