SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 32 of 32
  1. #26
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No I didnt remember the doctype, thanks for that, but how does that work! Why should having the doctype change anything??

  2. #27
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because an omitted doctype declaration will cause IE5/Mac, IE6/Win, IE7/Win, Gecko browsers, Opera, Safari and Konqueror to use their 'quirks' rendering mode, where they emulate older browser instead of following the CSS specification.

    Some doctype declarations will also cause quirks mode. This is known as 'doctype sniffing' or 'doctype switching'.

    Search for 'quirks mode' in your favourite search engine and you will find tons of information.
    Birnam wood is come to Dunsinane

  3. #28
    SitePoint Wizard bronze trophy C. Ankerstjerne's Avatar
    Join Date
    Jan 2004
    Location
    The Kingdom of Denmark
    Posts
    2,702
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Basically, omitting the DOCTYPE from an HTML document is the same as a store not having any labels on it's canned food: You have no way on knowing what it is until you've opened it up, and by then it's too late to make up your mind.
    Christian Ankerstjerne
    <p<strong<abbr/HTML/ 4 teh win</>
    <>In Soviet Russia, website codes you!

  4. #29
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for that, I didnt know that!

  5. #30
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by C. Ankerstjerne View Post
    Basically, omitting the DOCTYPE from an HTML document is the same as a store not having any labels on it's canned food: You have no way on knowing what it is until you've opened it up, and by then it's too late to make up your mind.
    Yes and no. A user agent will know that it is HTML, because of the Content-Type:&#160;text/html HTTP header. It will not know exactly which flavour of HTML it is, but that doesn't really matter for web browsers. They support HTML, not specific versions. A browser that has support for <font> tags will handle them even if the doctype declaration says HTML 4.01 Strict.
    Birnam wood is come to Dunsinane

  6. #31
    SitePoint Guru
    Join Date
    Mar 2004
    Location
    Earth
    Posts
    406
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    They support HTML, not specific versions. A browser that has support for <font> tags will handle them even if the doctype declaration says HTML 4.01 Strict.
    Arguably a mistake. I would advocate UAs being strict about what HTML is supported in relation to a specified doctype, and for elements which are not present in a particular spec, simply render their contents plain as for any other unsupported tag

  7. #32
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although I can see how that could be nice in some ways, it would be impractical for browsers. They would have to read the external subset (at least if there is no FPI), which would incur a performance penalty on the client and major load issues on the servers that host the DTDs. And what about documents with no doctype declaration at all?
    Birnam wood is come to Dunsinane


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
  •