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>

Comments

  1. User Avatar
    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. User Avatar
    Ant
    Permalink to comment#

    I prefer HTML 4.01 Strict, but soon may migrate to

  3. User Avatar
    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.

    • User Avatar
      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. User Avatar
    Ant

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

  5. User Avatar
    neha
    Permalink to comment#

    can u tell me the doctype for mobile html

    • User Avatar
      fazle
      Permalink to comment#

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

  6. User Avatar
    neha
    Permalink to comment#

    tell me the doctype for mobile web

    • User Avatar
      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.

  7. User Avatar
    Khan Afzal
    Permalink to comment#

    What is the difference between Strict and Transitional Flavours in HTML4.01???

Posting Code

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.

Submit a Comment

icon-closeicon-emailicon-linkicon-menuicon-searchicon-tag