Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

HTML doctype tag

HTML Doctype Tag

HTML Doctype Tag is used to specify the version of the Html using.

This tag must include before html tag to show Document Type Declaration. Tag tag does not contain any content and does not have any closing tag.


Syntax


Doctype tag example
	This is the body content.
 

Output

This is the body content.

HTML Doctype html4 declaration

This is the example for Doctype HTML 4 declaration.

ldquo;-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>


Doctype tag example
	This is the body content.

Output

This is the body content.

List of different doctypes

Sr. No. doctype version Declaration
1 HTML 5
2 HTML 4.01 Strict ldquo;-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
3 HTML 4.01 Transitional ldquo;-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
4 HTML 4.01 Frameset ldquo;-//W3C//DTD HTML 4.01 Frameset//EN” “http://www.w3.org/TR/html4/frameset.dtd”>
5 XHTML 1.0 Strict ldquo;-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
6 XHTML 1.0 Transitional ldquo;-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
7 XHTML 1.0 Frameset ldquo;-//W3C//DTD XHTML 1.0 Frameset//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>
8 XHTML 1.1 ldquo;-//W3C//DTD XHTML 1.1//EN” “http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

PDF Version

The post HTML doctype tag appeared first on Tutorialdeep.



This post first appeared on Tutorialdeep - An Online Web Development And Blogging Tutorial, please read the originial post: here

Share the post

HTML doctype tag

×

Subscribe to Tutorialdeep - An Online Web Development And Blogging Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×