HTML Tutorials - Herong's Tutorial Examples - v2.30, by Herong Yang
HTML Document Syntax
This section describes the HTML document syntax. A HTML document must have a DOCTYPE declaration and an 'html' element.
At a high level, the HTML document syntax is very simple for the HTML5 standard as described below.
An HTML document consist of 6 parts in the given order:
Here is a simple example of HTML document that matches the above HTML document syntax requirements:
<!DOCTYPE html> <!-- HTML5_Document_Syntax_Example.html - Copyright (c) 2014 HerongYang.com. All Rights Reserved. --> <html> <!-- "html" is the root element --> <head> <title>HTML5 Document Syntax Example</title> </head> <body> Hello World! </body> </html> <!-- End of the document -->
Table of Contents
Introduction of HTML5 Features
HTML Document Structure and Content
►HTML Document and Elements Syntax
Document Character Set and Encoding
Entering Comments in HTML Document
Opening and Closing Tags of Elements
Using Character Entity References
Using Numeric Character References
Displayed and Printed HTML Documents
Responsive Design of Web Pages