Advanced Search

Results 1 to 3 of 3

Thread: Best Doctype and why?

  1. #1
    Join Date
    Sep 2008
    Posts
    48
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Best Doctype and why?

    What's the best doctype to use and why should I use it?

    Thanks

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,127
    Thanks
    61
    Thanked 437 Times in 426 Posts
    Blog Entries
    7

    Default

    you should use the doctype that matches the code you write.

    Personally, I use html 4.01 strict. It's the most widely supported by browsers.

    xhtml is fine too, though most browsers don't actually parse it as xml, which means (IMO) that there's really not much point. It's nothing more than html 4 with self-closing tags.

    html 5 is far from being ready. You have to use javascript hacks to get it to work at all in IE, and the more useful elements aren't working at all yet.

    Whichever you choose, use the "Strict" version of the doctype (except html5, of course, which has no DTD) and make sure your code follows the rules. That way, you can ensure your markup is being rendered consistently.
    Adrian ~ facebook | gist/github

    ['66.215.156.37','208.75.149.97'] // ip,ip array!
    "Take that sticker *off* your hat; you look stupid" --Wil Wheaton

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    11,787
    Thanks
    225
    Thanked 657 Times in 645 Posts

    Default

    I'm closing this discussion. Please do a search for similar topics before starting a new one.
    Here's a long discussion, for example:
    http://dynamicdrive.com/forums/showthread.php?t=54587
    Daniel - Freelance Web Design | <?php?> | <html>| Deutsch | italiano | español | português | català | un peu de français | Ninasoma Kiswahili | 日本語の学生でした。| درست العربية

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •