Re: Intent to Conform (was Re: Version information)

Chris Wilson wrote:
> Maciej Stachowiak [mailto:mjs@apple.com] wrote:
>> Fair enough, but <!DOCTYPE html> has the significant advantage that
>> it triggers standards mode in current browsers, so it's easier to
>> make content that degrades gracefully. I don't think <!DOCTYPE html5>
>> would.
> 
> Umm, it does in IE.  And I'd expect it to in any other browser, too - it's an unknown doctype.

It's not only unknown, it's not recognized as a doctype at all by some UAs.

So as it happens, it triggers quirks mode in Gecko, because the doctype 
parsing logic looks for "html" after the "doctype" (since we're 
generally assuming we're dealing with an HTML doctype), then starts 
looking at the characters after that (the '5' in this case).

That's not something expected in an HTML doctype, so the parser bails 
out.  So this falls into the "A DOCTYPE declaration that cannot be 
understood (e.g., no matching quote)." case under 
<http://developer.mozilla.org/en/docs/Mozilla%27s_DOCTYPE_sniffing#Quirks_Mode>. 
  Note the link to the testcase in that item.

-Boris

Received on Thursday, 12 April 2007 18:24:27 UTC