← Back to context

Comment by masklinn

2 hours ago

> HTML5 could have taken the extra step of defining a canonical XML or XML-compatible DOM encoding, or at least encouraged it.

Yeah and then we could have called it xhtml5. Too bad that does not exist. Oh wait https://html.spec.whatwg.org/multipage/xhtml.html

> But the anti-XML sentiment was explicit and spiteful.

No, xhtml was just a bad idea creating tons of problems and solving none.

> xhtml was just a bad idea creating tons of problems and solving none.

Well an XHTML parser (and serializer) is a lot simpler, which is a pretty meaningful problem to solve.

What problems does xhtml create?

  • > Well an XHTML parser (and serializer) is a lot simpler

    Perhaps, but a combined html and xhtml parser is more complex than just a html parser. Since html already is entrenched, xhtml would be in addition to html, not instead of.

  • The main one is that even a slightly broken XHTML document will fail to render. HTML is much more forgiving.

    • 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.

      7 replies →

    • That's what browsers at the time did. But the format could be used with a lenient parser if anyone wanted that