2 ms·
> Attempts to define HTML syntax strictly (like DTD-based HTML 4 and earlier, or like XHTML) result in parsers that can't parse websites. That’s a good thing.
by kuschku 10y ago
> Attempts to define HTML syntax strictly (like DTD-based HTML 4 and earlier, or like XHTML) result in parsers that can't parse websites.
That’s a good thing.
Because it means websites will be forced to fix their shit, or be broken.
Browsers should start with a strict parsing standard, and color the addressbar in a warning red on every page that doesn’t fulfil it.
After a year or two, remove support for non-strict parsing piece by piece, until a strict situation is the result.
You don’t see WebAssembly parsing everything that’s possible either.
And JavaScript parsers trying to make sense of nonsensical content also haven’t been a thing in years.
In fact, the exact same thing happens with language all the time: A standards body decides to standardize part of the language, and simplify it, and then new grammatical rules are written, and enforced by law in education, and kids learn the new rules that make everything simpler.
A few years later, everyone has adapter – you don’t see anyone using pre-2006 German anymore, either.
If we can do it with fucking language, we also can do it with the web.