All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.


Last updated on:

HTML 4.01 Strict


XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"




<!DOCTYPE html>


  1. flofies
    Permalink to comment#

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

  2. Ant
    Permalink to comment#

    I prefer HTML 4.01 Strict, but soon may migrate to

  3. Chris Radford

    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.

    • Youngstream
      Permalink to comment#

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

  4. Ant

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

  5. neha
    Permalink to comment#

    can u tell me the doctype for mobile html

    • fazle
      Permalink to comment#

      Same Doctype should work in all the browsers irrespective of the platform you are in.

  6. neha
    Permalink to comment#

    tell me the doctype for mobile web

    • Evan
      Permalink to comment#

      @ neha,
      The layout of your html/css/js is what determines a mobile design. There is no doctype specifically for mobile.

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed