Quackit Logo
Sponsored Links
Create a website for free - uCoz
Build a website quickly and easily Customizable templates and graphics
$1.99 Domain Names
With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.
FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.

HTML 5 <!DOCTYPE>

Print Version

The HTML <!DOCTYPE> tag is used for specifying which language and version the document is using. This is referred to as the document type declaration (DTD).

With the introduction of HTML 5, the <!DOCTYPE> tag is mostly useless, as HTML 5 does not require a reference to a DTD. Having said that, for legacy reasons, the HTML 5 specification recommends including the <!DOCTYPE> header at the top of all HTML documents.

In HTML 5, the <!DOCTYPE> declaration is much simpler than in previous versions:

<!DOCTYPE HTML>

Usage Example

As you can see, the <!DOCTYPE> declaration goes right at the top.

<!DOCTYPE HTML>
<html>
 <head>
 </head>
 <body>
   <p>Page content...</p>
 </body>
</html>

Note that the <!DOCTYPE> declaration is case-insensitive.

Also see the HTML 4.01 tags


Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation
  4. Add this page to your favorite social bookmarks sites:      

Oh, and thank you for supporting Quackit!