3 ms·
As I said, we now have rules for broken HTML like that. Yes, it validates. It's Postel's Law run amuck.
by greglindahl 9y ago
As I said, we now have rules for broken HTML like that. Yes, it validates. It's Postel's Law run amuck.
- chrismorgan 9y agoThe point is that this is legal HTML. The HTML spec does define all kinds of things as illegal (though it defines how the parser should handle them, for reasons of security and consistency), but these things are all legal. All have had the same behaviour forever, though omitting <html>, <head> and <body> tags being legal is, I believe, new to HTML 5. But the rest (e.g. not closing a paragraph tag and not using quotes on simple attribute values) have been legal from the very start, and even popular, though they have fallen out of favour for authoring in recent years. This is absolutely nothing to do with Postel’s law. I believe that Postel’s law is a terrible idea in most places—it leads to a lack of robustness in practice, and all kinds of security problems, because most programmers are frankly not good at their trade. Rather, the HTML spec defines all behaviour—so there is no liberality about it; you’re simply following the spec with no interpretation—which is the only way to write robust protocols and their implementations.
- azr79 9y agoHow is this broken HTML, it's valid HTML