Question about Doctype

Discussion in 'HTML' started by Davmagic .Com, Nov 22, 2003.

  1. I used the html "Tidy" generator to convert some of my pages to xHTML
    and it placed this tag before the Doctype on those pages: <?xml
    version="1.0"?>

    My question is: Will this tag cause browsers to go into "Quirks mode"
    rather than Standards Mode?

    Source this page for reference: http://davmagic.com

    Thanks.......

    Web Design-Magic-Painting-Junking-Games
    INFO 2000 For You
    http://www.davmagic.com
    See how your webpages look on a MSN-TV Browser:
    Download it here: http://developer.msntv.com/Tools/msntvvwr.asp
     
    Davmagic .Com, Nov 22, 2003
    #1
    1. Advertising

  2. Davmagic .Com:

    > I used the html "Tidy" generator to convert some of my pages to xHTML
    > and it placed this tag before the Doctype on those pages: <?xml
    > version="1.0"?>


    > My question is: Will this tag cause browsers to go into "Quirks mode"
    > rather than Standards Mode?


    It will cause MSIE6 to go into Quirks Mode, and also some (possibly all)
    versions of Opera 7.

    In the case of MSIE6 that is (most probably) just a stupid bug. In the
    case of Opera 7 it's (most probably) a case of extremely poor judgement.

    Other browsers that use mode switching will not go into quirks mode when
    they see such an XML declaration.

    If you take out the XML declaration, and if you use some encoding other
    than UTF-8 (or UTF-16) you must declare the encoding in the HTTP header.
    A declaration in a "meta" element won't do. (It's of course always best
    and very adviceable to declare the encoding in the HTTP heaer.)

    --
    Bertilo Wennergren <> <http://www.bertilow.com>
     
    Bertilo Wennergren, Nov 22, 2003
    #2
    1. Advertising

  3. Bertilo Wennergren wrote:

    > It will cause MSIE6 to go into Quirks Mode, and also some (possibly all)
    > versions of Opera 7.
    >
    > In the case of MSIE6 that is (most probably) just a stupid bug. In the
    > case of Opera 7 it's (most probably) a case of extremely poor judgement.


    I believe the Opera guys have admitted it was an accident, and that it has
    been fixed in 7.2x.

    Also, if you serve XHTML with the application/xhtml+xml MIME type, it
    "forces" standards mode in Opera.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 22, 2003
    #3
  4. Davmagic .Com

    Kris Guest

    In article <>,
    (Davmagic .Com) wrote:

    > I used the html "Tidy" generator to convert some of my pages to xHTML
    > and it placed this tag before the Doctype on those pages: <?xml
    > version="1.0"?>
    >
    > My question is: Will this tag cause browsers to go into "Quirks mode"
    > rather than Standards Mode?


    It will cause IE4/Mac and assumably other browsers of that kind (windows
    version, anyone?) to display nothing but a blank page. Better to leave
    it out, since it is optional anyway.

    --
    Kris
    erlands (nl)
     
    Kris, Nov 22, 2003
    #4
  5. Davmagic .Com

    Mark Parnell Guest

    Sometime around Sat, 22 Nov 2003 13:11:20 +0000, Toby A Inkster is reported
    to have stated:
    >
    > Also, if you serve XHTML with the application/xhtml+xml MIME type, it
    > "forces" standards mode in Opera.


    But doesn't work at all in IE. :-(

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Nov 23, 2003
    #5
  6. Mark Parnell wrote:

    > Sometime around Sat, 22 Nov 2003 13:11:20 +0000, Toby A Inkster is reported
    > to have stated:
    >>
    >> Also, if you serve XHTML with the application/xhtml+xml MIME type, it
    >> "forces" standards mode in Opera.

    >
    > But doesn't work at all in IE. :-(


    Hence content negotiation. Google for a thread about a week ago starring
    Bertilo Wennergren and myself, subject "Re: HTML or XHTML??".

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 24, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian

    vs.net creates doctype wrong?

    Ian, Jun 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    490
  2. Kenneth Keeley

    Setting DocType in Asp.Net

    Kenneth Keeley, Jun 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    630
    Cowboy \(Gregory A. Beamer\) [MVP]
    Jun 30, 2004
  3. Albert Wiersch
    Replies:
    29
    Views:
    856
    Mark Parnell
    Aug 16, 2005
  4. Tom de Neef

    DOCTYPE related question

    Tom de Neef, Feb 10, 2012, in forum: Javascript
    Replies:
    7
    Views:
    587
    Thomas 'PointedEars' Lahn
    Feb 10, 2012
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,333
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page