HTML Tutorials - Herong's Tutorial Examples - v2.22, by Dr. 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