HTML Tutorials - Herong's Tutorial Examples - v2.30, by Herong Yang
HTML Document Top Level Structure
This section describes the top level structure of an HTML document - a DOCTYPE declaration followed by an 'html' element with 2 sub elements: 'head' and 'body'.
The top level structure of an HTML document should have the following parts:
1. DOCTYPE declaration - Defines what version of the HTML language is used for the document.
2. Document root - A single "html" element that contains the entire HTML document content.
3. Document metadata - A single "head" element as the first sub element in the "html" element that contains a collection of metadata for the Document.
4. Document main content - A single "body" element as the second sub element in the "html" element that contains the main content of the Document.
Below is an illustration of an HTML5 document structure:
<!DOCTYPE html> <html> <head> (Document metadata) </head> <body> (Document main content) </body> </html>
Table of Contents
Introduction of HTML5 Features
►HTML Document Structure and Content
►HTML Document Top Level Structure
HTML Document Metadata Elements
Headings and Implicit Sections
Elements for Explicit Sub Sections
Sectioning Contents with Heading Elements
Paragraph and Flow Content Elements
Text and Phrasing Content Elements
HTML Document and Elements Syntax
Displayed and Printed HTML Documents
Responsive Design of Web Pages