Code Snippet

Home » Code Snippets » HTML » The Common DOCTYPES

The Common DOCTYPES

HTML 4.01 Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML 1.1

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

HTML 5

<!DOCTYPE html>

Subscribe to The Thread

  1. flofies

    At last someone had the idea and made it real ! Thank you very much / looking forward to seeing that redesign.

  2. I prefer HTML 4.01 Strict, but soon may migrate to

  3. The HTML5 (space or no-space?) Doctype also covers everything previously so there’s no reason to not use it now.

    It triggers standards mode in IE and works correctly in all other browsers, the main reason for doctype is for validators anyway so as long as you don’t the ‘this is as yet an unfinished spec’ style of message, you’ve nothing to worry about.

    • So all the old IEs need is a doctype declaration to trigger the standards mode? No matter what version of it?

  4. HTML4 strict is my favorite. I’ll move to in future.

  5. can u tell me the doctype for mobile html

  6. tell me the doctype for mobile web

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~