Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

$1.99 Domain Names

With every new non-domain purchase thru ZappyHost, you get a domain name for only $1.99.

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. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
               
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!