Doctype. What type?

Discussion in 'HTML & Website Design' started by googlehead, Apr 20, 2010.

  1. #1
    What type of Doctype do I need to use? Strict, Transitional etc?

    thanks
     
    googlehead, Apr 20, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    The only doctype for new web pages is strict. You have no need for any other except if you use frames.
     
    drhowarddrfine, Apr 20, 2010 IP
  3. HiMyNameIsErez

    HiMyNameIsErez Greenhorn

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    It depends on your code,but I recommend to use strict
     
    HiMyNameIsErez, Apr 20, 2010 IP
  4. javier.garcia.esteban

    javier.garcia.esteban Well-Known Member

    Messages:
    66
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    118
    #4
    The transitional doctype "allows" some deprecated elements, like FONT or FRAMESET, so it depends on the elements you are using (but of course it's recommended that you use Strict and not those elements).
     
    javier.garcia.esteban, Apr 20, 2010 IP
  5. NemoPlus

    NemoPlus Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hello,

    In contrast to the other replies, I encourage the use of Transitional.
    Today's browser are all able to show transitional html pages without any problems. It is VERY hard to obtain valid strict html pages, but why would you bother? The visitor will not see the difference unless he reads your source code, which most visitors luckily don't do :) I don't see any added value on this substantial extra work.

    What is more important: don't just write the doctype, but make sure that it IS really valid!! Added value: browser compatibility, because you can't possibly check every page on every existing browser in any version on any platform.

    Remark: this page itself is set to Transitional, but is in fact not valid.
     
    NemoPlus, Apr 20, 2010 IP
  6. deaglezor

    deaglezor Member

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    38
    #6
    This might help you: htmlhelp.com/tools/validator/doctype.html
     
    deaglezor, Apr 20, 2010 IP
  7. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #7
    The same is true of strict.
    Also a false statement.
    The doctype isn't for the user, it's for the developer, validator and the browser.
    There is no additional work based on which doctype you use.
    This does not affect which doctype you use.

    You don't understand what doctypes are for.
     
    drhowarddrfine, Apr 20, 2010 IP
  8. Areol

    Areol Peon

    Messages:
    208
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yeah i agree with the above . Doc types are simply guidelines. They dont guarantee that it will work in every browser.That is infact your job. It simply guides you to use certain tools ie html elements that is valid to that doc type.

    This site is transitional for a reason and not what NemoPlus implied.
     
    Areol, Apr 20, 2010 IP
  9. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #9
    I always start with this one.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Code (markup):
    Why ? Because it's been working for me since the first time I tried it.
     
    joebert, Apr 20, 2010 IP
  10. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #10
    So, you're clueless.
     
    drhowarddrfine, Apr 20, 2010 IP
  11. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #11
    Who gives a shit. I have good numbers for time on site and page views per visit. My sites render the same in all browsers with the exception of a few oddball things like border-radius that make no significant difference. My sites support themselves financially.

    I really have no incentive to piddlefuck around worrying about whether I picked the absolute best possible DOCTYPE for my pages. This one works and I don't have to tear my hair out any time I want to implement some sort of 3rd party code or something as trivial as a TARGET attribute on a link. :D
     
    joebert, Apr 20, 2010 IP
  12. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #12
    Ive literally just finished reading a book tonight that includes a lot of html info and advice and its suggested to go with strict, from other books ive read and also from dozens of web dev blogs that ive read.
     
    pipes, Apr 20, 2010 IP
  13. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #13
    Those of us who aren't clueless like you.
    Only the clueless would think the doctype has any affect on that.
    Three years from now, you won't be in this business.
    Again, only the clueless think the doctype has anything to do with that.
     
    drhowarddrfine, Apr 20, 2010 IP
  14. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #14
    Really ?

    That's funny, because I've been in this same discussion multiple times on other forums for about the last 6 years. Back then I was arguing your point. Today I don't waste my time worrying about it.
    I do better today than I did back then. That's the whole point of this, right, to do better than we were before ?

    I used to think that to.
     
    joebert, Apr 21, 2010 IP
  15. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #15
    @joebert,

    As HTML5 takes hold, you will be a lost ball in the tall weeds.
     
    drhowarddrfine, Apr 22, 2010 IP
  16. Areol

    Areol Peon

    Messages:
    208
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    You canot simply use something because it works. You need to know why it works etc. Its like going into a computer store and you are buying a computer. So what you are saying is who gives a shit what computer i buy they all work the same . No thats exactly what you wont be saying & doing and that is my point and others here , there's other factors involved same with doctypes.
     
    Areol, Apr 22, 2010 IP