Aug 21200612:00 AM CDT

Critics of validation

Categories: Tips, Internet

Now, I should say that I believe in Web standards, of which validation is only part and an often over-emphasised part; but validation is still important for standards, and the things I've seen written against it are rather silly.

Who put the W3C in charge of deciding what code we could use?

Well, some members of the W3C are the people who actually invented HTML and CSS. They gave that technology to the world, instead of slapping a patent on it, and you should be darn well grateful.

The W3C acts as a standards body, preparing official specifications of HTML and CSS which then form the basis for what browsers are programmed to understand. (So there's one very practical reason for paying attention to the W3C. No one is ever going to make a browser geared to your personal interpretation of HTML and CSS.) Every language has standards, every form of technical information storage has standardising bodies – what's wrong with that? And if you use code not supported by the W3C, don't fool yourself that you're striking a blow against tyranny. That code was invented by browser manufacturers to gain commercial advantage in the days of the browser wars. It's far less free than the open source standard upheld by the W3C.

Validation is just a fad.

Among some people, that is true. Some page authors validate their code but don't really understand Web standards. On the other hand, those who complain about validation just being a 'fad' demonstrate their own lack of understanding of Web standards. Validation is like the grammar of a language; it determines what parts of the language go where in the sentence and whether the punctuation is correct. The deeper relevance of Web standards is in the meaning of the individual words, i.e. the HTML elements. Semantics is not and is never just a 'fad'.

If my site looks OK, who cares what the code is like?

Screen reader users do. Search engine robots do. People surfing on handheld devices do. People using text-only browsers do. They don't get your visual design. They get the structure of the underlying code. The tyrants at the W3C, you see, actually want the Web to be inclusive of those users.

If I validate, I can't use the target attribute for links.

Of course you can, provided that you choose the appropriate doctype. The target attribute is valid under HTML 4.01 Transitional and XHTML 1.0 Transitional, together with their respective Frameset specifications. It's only invalid under the Strict doctype.

Validating code doesn't mean that it'll display correctly in every browser.

No, but it stands a better chance of displaying correctly in multiple browsers than invalid code does. Plus, Web standards put less emphasis on 'displaying' and more on serving content. A site that has structural HTML markup and an ultra-modern CSS layout might appear completely unstyled in, say, Netscape 4, but all the content would still be readable and accessible. Valid code is also the first step towards cross-platform as well as cross-browser compatibility.

Firefox messes up my code!

Just possibly; every browser has bugs. But chances are that the code was already broken, and Firefox just showed it warts and all. Internet Explorer is the deceitful browser, because it patches up incorrect code and makes it look correct. That's the legacy of the browser war years, in which the browser that required the least effort from the designer got the biggest market share. Browsing has gone open source now, and those days are gone.

Google doesn't validate!

No, it doesn't. Neither do Amazon and a host of super-successful ecommerce sites. So what? People say this as though it was a clinching argument, but why?

There are commercial reasons why a very high-profile site might not embrace Web standards. Branding is very important to ecommerce sites. They're not just interested in content delivery but in making their visual design look identical for as many customers as possible, even the one still using Netscape 4. That puts more focus on backwards compatibility than on forwards compatibility. Alternatively, coding quality may be unimportant because the site acts mainly as a portal to somewhere else. Google's success is based on its search engine and database, not on the quality of its front end, which is purely minimalist and functional. In that respect, it's misleading to compare the HTML and CSS of Google with that of a content-driven site.

Furthermore, because those sites currently don't use Web standards doesn't mean they wouldn't benefit from doing so. Using semantic HTML with external CSS saves bandwidth, and saving bandwidth saves money. When a homepage gets a million hits per day, even a small reduction in its file size makes a substantial yearly difference. Using Web standards also makes sites more accessible, with consequently no need for maintaining separate 'accessible' versions (as Amazon once did), and makes it easier to carry out site-wide redesigns.

Finally, because a company is commercially successful does not mean that it uses best practice. Big companies are, generally, not the leaders when it comes to ethical matters. Because major clothing manufacturers use sweatshop labour doesn't excuse a small manufacturer from doing the same. Because major ecommerce sites use outdated, non-standard, non-semantic code doesn't excuse other sites getting it wrong.