Sam Collett schrieb:
> In IE it doesn't make a difference in rendering whether you use HTML4
> or XHTML as the DOCTYPE. You could probably even have HTML 3 as the
> DOCTYPE and still have it render the same.
> 
> Mozilla on the other hand, does sniff DOCTYPE:
> http://developer.mozilla.org/en/docs/Mozilla's_DOCTYPE_sniffing
> 
> 3 modes: Full Standards Mode, Almost Standards Mode (only for HTML 4 /
> XHTML 1.0 Transitional / Frameset) and Quirks Mode.

That's not true. IE 6+ does have a Standards and a Quirks Mode. I'm sure 
MS invented the whole thing to overcome the incorrectly implemented box 
model in IE 5. Thats why IE 6 in Quirks Mode will use the old box model, 
whereas IE 6 in Standards Mode will use the standards compliant (W3C) 
box model.

In IE, if you use a Doctype with a System Identifier (URL) it will 
render in Quirks Mode (at least with XHTML and HTML 4 Doctypes - I 
really don't know/care about HTML 3):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

It will render in Quirks mode if you omit the System Identifier:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">

It will also render in Quirks mode if you put an HTML or an xml 
declaration comment before the Doctype declaration:

<!-- put IE into Quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

Here's a pretty good overview:
http://hsivonen.iki.fi/doctype/



-- Klaus





_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to