HTML Tutorials - Herong's Tutorial Examples - v2.30, by Herong Yang
HTML5 DOCTYPE Declaration
This section describes the HTML5 DOCTYPE declaration statement - 'DOCTYPE html', which is much simpler than the HTML 4.01 version.
Since HTML5 is not based on SGML (Standard Generalized Markup Language) any more, it does not require any reference to a DTD (Document Type Definition) in the DOCTYPE declaration.
So the HTML5 DOCTYPE declaration statement is very simple:
<!DOCTYPE html>
Here is a very simple HTML5 document with the correct DOCTYPE declaration:
<!DOCTYPE html> <html> <head><title>Hello</title></head> <body>Hello world!</body> </html>
As a comparison, DOCTYPE declaration statements for HTML 4.01 are listed below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
Table of Contents
►Introduction of HTML5 Features
Differences between HTML5 and HTML 4
Adding Inline SVG Image in HTML5 Documents
Adding MathML Formula in HTML5 Documents
"article" and "section" Elements
"header" and "footer" Elements
"details" and "summary" Elements
"figure" and "figcaption" Elements
HTML Document Structure and Content
HTML Document and Elements Syntax
Displayed and Printed HTML Documents
Responsive Design of Web Pages