The failure state of the XHTML syntax is an error page. The failure state of the HTML syntax is your browser silently making its best guess.
Some people say that this works in HTML's favour, because some content is better than no content is better than an error page. I can understand this argument for people building large, dynamic sites.
But for small, static sites, if there's a bug in my code or code generator, I wanna KNOW.
@onethousandtwentyfour this feels like a distraction from the real differentiator to me? i.e. for non professional, non-technical authors, they'll probably just get frustrated instead of being able to fix obscure problems. that's why browsers are error friendly, not large dynamic sites (most good dynamic site frameworks make it impossible to generate incorrect html anyway)
if you had asked 12-year-old me on neopets to fix an improperly nested tags issue before I could see ANYTHING.....
@nightpool right so,
(1) these arguments are a bit antiquated and come from a time when most dynamic websites were written in PHP. many still are though. and it is very easy to write PHP which generates incorrect HTML. many businesses and shops run on code like this.
(2) i disagree that XML errors are obscure; there are only like five of them, and firefox tells you exactly where they are. more generally, i disagree with the idea that providing feedback makes it HARDER to learn.
@nightpool (3) mostly though my point is about static site generators and scripts, where you might be using handwritten templates and includes. if you make a mistake in that instance, XML makes it very obvious when you check your site that there is a bug in your script/template/include.
but this of course is only a strength on a finite site where you are actually able to *check* each page.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!