Top Level Structure of XHTML5 Documents

Q

What is the Top Level Structure of an XHTML5 Document?

✍: FYIcenter.com

A

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="http://www.w3.org/1999/xhtml">
<html>
 (Second level structure)
</html>

 

Smallest Valid XHTML5 Document

Validating HTML5 Documents Online

Introduction of HTML5

⇑⇑ HTML Tutorials

2024-03-17, 1090🔥, 0💬