No errors, no warnings, no gods, no masters - HTML Purity is a Fetish
Follow into
Save into
Follow into
"The problem with defending the purity of the HyperText Markup Language is that HTML is about as pure as a cribhouse whore. The standard doesn't just borrow concepts from better languages; on occasion, HTML has pursued other programming languages down alleyways to beat them unconscious and rifle their pockets for new syntax0."
Englitch is an pretty goode langwidge. even you no grok all the pacific bits you got the jist & the splelling & grandma dont mattr to much.
HTML is much the same. You can write utterly malformed, derranged, non-standards complaint HTML and most browsers will just say "Yeah, sure, whatever dawg!" and render it adequately. Take a look at the source code for TodePond - a lovely website but some of the most abused HTML I've seen.
There's a brilliant blog post by Jens Oliver Meiert which looks at whether HTML validity is seen as a priority for major sites. Basically, no.
It’s time for the annual analysis of how much of the HTML code in the field is error-free and valid. The short version: 1% of the most-frequented sites on this planet uses valid HTML—and 99% don’t.
iS ThAt A pRoBlEm????
My site is proudly HTML Valid. Run it through the HTML Validator or the Schema.org Validator and you'll see that it is fucking perfect! Same with my RSS Feed and Atom Feed. Not so much as an advisory bit of info, a couched warning, or a sternly worded suggestion1.
Every last bit pure and holy.
Of course, syntactically valid HTML is neither necessary nor sufficient for any purpose.
Perfect HTML doesn't imply that a site is accessible (although, I'm proud to say mine meets or exceeds all WCAG guidance2).
Perfect HTML doesn't guarantee that the information it contains is accurate3.
Perfect HTML, at best, merely implies that the author gives a damn about such things. Much like Knolling, it leaves a suggestion that order is preferable to chaos4.
It is said that one of the reasons HTML succeeded is that it is lax about validation. Most programming languages will shit the bed if you dare to leave out so much as a single semicolon. The compiler wails can be heard throughout the land.
By contrast, HTML is designed to be sympathetic to the frailty of the human mind. "Oh, you didn't close an element? Well, you opened a new one which I guess implies the same thing. Did you forget the correct syntax? Never mind - it'll be our little secret."
That's why XHTML failed - the browser would literally refuse to render a page if it didn't meet the spec. Who can be bothered with that?! HTML just lets you get on with things.
As I've mentioned before, humans don't write or speak in Backus–Naur form. Our ideas are loosely expressed in a floating grammar which lends itself to paradoxical impossibilities and logical tautologies. And yet most of us can still parse weird sentences without too much effort.
But most computer languages are different. It might be obvious to you that if (x = 42) means "compare the value of x to 42" - but what the computer sees is "if assign x the value of 42". Within computing our code needs to be rigorously formal and any syntax errors will lead to show-stopping bugs.
Imagine if every time a human wrote Romanes eunt domus the world simply crashed. It would be intollerable.
HTML is more like a human language than a computing language. You can understand human speech over a crackly phone line in a foreign accent - Web Browsers understand CP-1252 encoded text with bizarre syntax errors.
If it is OK to write bad HTML, why do some of us fetishise "pure" HTML?
I think it comes down to an ingrained belief that it is polite to reduce ambiguity. It is nice to be precise5. It reduces the cognitive burden on anyone (or anything) which reads what we have written. We are holding up our end of the social contract by producing something unadulterated and easy to comprehend. It reduces the likelihood of different browsers rendering things differently but, almost on a cellular level, we feel that things must be done properly.
The browser doesn't care about your inability to follow standards. But you should have some fucking self-respect and do it anyway.
- With the appropriate amount of apologies to James Nicoll ↩︎
- At the time of writing. Who knows what batshit bugs I'll accidentally include in the future 🙃 ↩︎
- Again, it is possible to make something pass automated testing while still being an accessibility mess. ↩︎
- Although, of course, everything you read in this site is 100% accurate. ↩︎
- Or some horrifying psychological issue. Potato / Tomato. ↩︎
- I will grant you, there's also a strain of 100% Completionist which compels me to get "top score" on all the benchmarks. But that's just pure vanity. ↩︎