Hacker News new | ask | show | jobs
by smallerize 45 days ago
The main one is that even a slightly broken XHTML document will fail to render. HTML is much more forgiving.
2 comments

With the benefit of hindsight, if the web had been that way from the beginning, I think we would have been better off. The moment you tested your content in any browser, you'd immediately see if it was broken.

But it wasn't something that could get introduced later, after all the broken content that already existed.

With all respect - the opposite is true. The web succeeded because HTML and HTTP are easy standards easily writable by humans with text editors. HTML was writable by non-programmers.
I don't think "parsed strictly" makes something hard; on the contrary, I think it's helpful to make something easy. Clear feedback, easy to test.

But then, I've always preferred strongly typed over stringly typed.

This imagines HTML as code and not markup.

The reason HTML and markdown are more widely adopted than latex is because the former are more forgiving.

I am thinking of it as markup. I stand by the point: I think "forgiving" is not a feature in parsing; it's a bug.
Forgiving is very helpful in enticing those whose content you'd like to parse to start producing content. There's no use in having the worlds greatest pipeline if nothing is being put in and moved through. See the tragedy of the death of flash and "surely someone will come along and make a great frictionless editor for canvas and webgl", only for all the creative energy ending up being sucked up and monetised by roblox, leaving the world worse off.
The reason HTML is more widely used than latex is obviously because browsers support it natively.
The low barrier to authoring was very important. No tools needed except notepad and a browser. Syntax easy to understand and write by hand.

But I don’t think the ambiguous html parsing made it easier. If anything it made it more difficult since you had to test in multiple browsers. Eg a table which was not properly closed would render in IE but not render in Netscape.

That's not obviously so. The adoption of JS wasn't particularly hindered by the fact that users have to match their brackets and generally avoid syntax errors.
Yeah, I think SGML HTML as the first pass was a mistake. All my early websites were XHTML until people called them "bad"...
That's what browsers at the time did. But the format could be used with a lenient parser if anyone wanted that
The HTML spec actually includes how to parse broken HTML. https://html.spec.whatwg.org/multipage/parsing.html#parse-er...
> But the format could be used with a lenient parser if anyone wanted that

Congratulation on reinventing HTML.

HTML but allowing XML compatible syntax to be valid.

XHTML5 sort of gets us there, but parsing in standard HTML5 mode still won't do the right thing with eg <b />