How are pre-HTML5 documents parsed?
All documents with a text/html media type (that is, including those without or with an HTML 2.0, HTML 3.2, HTML 4.01, or XHTML 1.0 DOCTYPE) will be parsed using the same parser algorithm as defined by HTML5. This matches what Web browsers have done for HTML documents so far and keeps code complexity down. That in turn is good for security, maintainability, and in general keeping the amount of bugs down. The HTML syntax of HTML5 therefore does not require a new parser and documents with an HTML 4.01 DOCTYPE for example will be parsed using the HTML5 parser. Validators are allowed to have different code paths for previous levels of HTML.