Wich DOCTYPE is better?

Discussion in 'Web Design' started by gabi, Aug 1, 2011.

to remove all ads.
  1. gabi

    gabi New Member

    Messages:
    13
    Hello!

    Can you tell me, from your expirience, wich doctype is better: HTML Transitonal or Strict, or XHTML Transitonal or Strict?

    Thanks!
     
  2. Phreaddee

    Phreaddee Super Moderator Staff Member

    Messages:
    1,978
    personally I prefer...
    HTML:
    <!doctype html>
    
    ...than anything else.
     
  3. PixelPusher

    PixelPusher Super Moderator Staff Member

    Messages:
    1,077
    It really depends on what you are doing with your site. Are you revamping? staring from scratch?

    If you are starting from scratch then my first choice would be the HTML5 doctype that Phreadde mentioned. If you prefer HTML4, then I would use the Strict doctype.

    If you are building upon an existing site and it may contain deprecated tags (that you don't or can't go back and rebuild) then Transitional would be the better choice.

    XHTML refers to the method in which HTML tags are written. All tags must be closed, self-closing tags are permitted where applicable.

    Ask Google: "what is doctype"...
    http://www.w3schools.com/tags/tag_doctype.asp
    http://en.wikipedia.org/wiki/Document_Type_Declaration
     
  4. gabi

    gabi New Member

    Messages:
    13
    Thanks!

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

    because I am starting from scratch, like you said John.
    Another "silly" question? Is there a difference in sites appearance betwenn strict and transitional?
    Sorry, I am a beginer!
     
  5. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    The only difference between strict and transitional is what shenanigans it will let you get away with. The correct DOCTYPE for HTML 5 is what Phreadee posted above. None of the DTD crap is required.

    I would suggest using HTML 5 for a new site. If you do, however, be sure to use the HTML5 shim.
     
  6. jumpingspider

    jumpingspider New Member

    Messages:
    252
    Very well said Ronald! I'd also suggest the HTML 5,if you're starting from nothing.
     
  7. krymson

    krymson Member

    Messages:
    338
    yeah im starting to get good with HTML5 so its what im making standard i would suggest you do it too
     

Share This Page