Re:Show HN: Online web tools to get your work done faster
by Tomte on Sunday February 04, 2018 @11:33PM
(#16306612)
That‘s perfecly valid HTML. Try it. Pass it to a validator.
[ Parent
| on HN ]
Re:Show HN: Online web tools to get your work done faster
by greglindahl on Sunday February 04, 2018 @11:37PM
(#16306626)
As I said, we now have rules for broken HTML like that. Yes, it validates. It's Postel's Law run amuck.
Re:Show HN: Online web tools to get your work done faster
by chrismorgan on Monday February 05, 2018 @02:34AM
(#16307221)
The 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.