Hacker News new | ask | show | jobs
by degamad 45 days ago
From long-lost memory, I think it's implicitly closed tags (e.g. img).
2 comments

That is one, but not the only thing. Non-xml html is just generally more forgiving.

If you make a mistake and use incorrect syntax in html, the browser will do its best to recover. In xhtml, it would just completely fail. Which approach is better is debatable.

XML can handle implicitly closed tags, they call them "empty" in the spec here:

https://www.w3.org/TR/xml/#sec-starttags

Empty tags in XML are not implicitly closed. They require the explicit /.
XML can handle <img /> but not <img> followed by tagsoup (like HTML handles).