(no title)
9029
|
4 months ago
Maybe a dumb question but I have always wondered, why does the (authoring?) spec not consider e.g. "doctypehtml" as valid HTML if compliant parsers have to support it anyway? Why allow this situation where non-compliant HTML is guaranteed to work anyway on a compliant parser?
LegionMammal978|4 months ago
[0] https://html.spec.whatwg.org/multipage/parsing.html#parse-er...
9029|4 months ago
Ah, that's what I was missing. Thanks! The relevant part of the spec:
> user agents, while parsing an HTML document, may abort the parser at the first parse error that they encounter for which they do not wish to apply the rules described in this specification.
(https://html.spec.whatwg.org/multipage/parsing.html#parse-er...)
HWR_14|4 months ago
AlienRobot|4 months ago