Comment by bazoom42

1 day ago

> Would it kill people to have to close their tags properly?

Probably not, but what would be the benefit of having more pages fail to render? If xhtml had been coupled with some cool features which only worked in xhtml mode, it might have become successful, but on its own it does not provide much value.

> but what would be the benefit of having more pages fail to render?

I think those benefits are quite similar to having more programs failing to run (due to static and strong typing, other static analysis, and/or elimination of undefined behavior, for instance), or more data failing to be read (due to integrity checks and simply strict parsing): as a user, you get documents closer to valid ones (at least in the rough format), if anything at all, and additionally that discourages developers from shipping a mess. Then parsers (not just those in viewers, but anything that does processing) have a better chance to read and interpret those documents consistently, so even more things work predictably.

  • Sure, authoring tools should help authors avoid mistakes and produce valid content. But the browser is a tool for the consumer of content, and there is no benefit for the user if it fails to to render some existing pages.

    It is like Windows jumping through hoops to support backwards compatibility even with buggy software. The interest of the customer is that the software runs.

    • > there is no benefit for the user if it fails to to render some existing pages

      What if the browser renders it incorrectly? If a corrupt tag combination leads to browser X parsing "<script>" as inline text but browser Y parsing it as a script tag, that could lead to serious security issues!

      Blindly guessing at the original author's intent whenever you encounter buggy content is a recipe for disaster. Sometimes it is to the user's benefit to just refuse to render it.

      1 reply →

    • > Windows jumping through hoops to support backwards compatibility even with buggy software

      This was, maybe, true some 10 years ago. Now even old Windows programs (paint,wordpad) do not run on newer Windows

      > The interest of the customer is that the software runs

      Yes, but testing is expensive and we are Agile. /s

      1 reply →

    • if developer accidentally left opening comment at the start of the html.

      Rhetorical question: Should the browser display page even if it is commented out?

      There is some bar for what is expected to work.

      If all browsers would consistently error out on unclosed tags, then it would definitely force developers to close tags, it would force it become common knowledge, second nature.

      1 reply →

  • HTML5 was the answer for the consistency part: where before browsers did different things to recover from "invalid" HTML, HTML5 standardizes it because it doesn't care about valid/invalid as much, it just describes behavior anyways.

I used to run an RSS feed consolidator, badly formed XML was the bane of my life for a very long time.

If devs couldn't even get RSS right, a web built on XHTML was a nonstarter.