On 02/08/2012 04:39, Robert A. Rosenberg wrote:
First is that while browsers may not actually use the referenced DTD
(the http... clause), they do parse the HTML based on the DOCTYPE html
PUBLIC... clause and treat the HTML differently based on what you declare.

No, they don't. It is used purely as a switch between standards, almost standards and quirks mode. This impacts CSS more than HTML in most cases.

Second is that just because the Validator approves of the supplied HTML5
HTML, that does not mean that a browser will not choke on it or display
the code properly. This is not the case with pre-HTML5 DOCTYPES where if
the Validator approves of the code, the browser will correctly parse,
interpret, and display it.

Browsers have never used DOCTYPES, therefore the validation of whether or not a document conforms (or not) to a DOCTYPE has no impact on whether or not a browser will correctly parse, interpret or display it.

IOW: At the current time, <!DOCTYPE html> throws the browser into "tag
soup" mode where it tries to figure out what it is being supplied with
as opposed to knowing how to parse and handle it.

It should throw the browser into HTML5 parsing mode, which is the first version of the standard which specifies what to do with invalid as well as valid markup. It also specifies validity in terms of what the resulting parse tree should look like rather than in terms of the format of the input document.

Whether it's in "tag soup" mode or not depends on the content-type header, not the DOCTYPE. If you serve with an XML content type then you'll get stricter XML parsing. See [1].

Rob

[1] http://wiki.whatwg.org/wiki/HTML_vs._XHTML#Differences_Between_HTML_and_XHTML
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to