Question about Doctype

D

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?

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
 
B

Bertilo Wennergren

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.)
 
T

Toby A Inkster

Bertilo said:
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.
 
K

Kris

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.
 
M

Mark Parnell

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. :-(
 
T

Toby A Inkster

Mark said:
Sometime around Sat, 22 Nov 2003 13:11:20 +0000, Toby A Inkster is reported
to have stated:

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??".
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Newbees: It's Quiz Time 82
What's Under The Hood? (OT) 1
Screen Shot Tool (O/T) 0
DOCTYPE related question 7
Why does Opera break images? 6
What doctype should I use ? 26
DOCTYPE error 7
Any Comments Here ? 20

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top