Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How are pre-HTML5 documents parsed?

documents HTML5 parsed
0
10 Posted

How are pre-HTML5 documents parsed?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.