The topic has resurfaced on blogs and Twitter recently: is code validation necessary? Well, yes and no.
Complete HTML (and CSS) validation is a great goal, but 100% validation is not crucial nor necessary. Browsers will usually correct and render markup that’s poor quality. This good because it give the user the best experience. But it’s bad in the long run because it encourages developers to not pay attention to code validation and web standards.
Web experts seem to agree that code validation is important and necessary to a certain extent, but for somewhat different reasons. In Nicholas Zakas’ article listed below, he states that correct syntax and nesting are most important aspects of valid code. Chris Heilmann points out that part of the issue is human error; people misinterpret the results. And Bruce Lawson summed it up 6 years ago by stating that validation is “a means” of proper web development rather than “an end”. These are all valid points.
Today, it seems the majority of web developers and designers still aren’t paying enough attention to valid code (as well as clean, progressively enhanced, semantic markup). And until they do (and realize this is the best practice), the community as a whole will continue to debate over this issue. My warning is this:
If developers continue to stray away from valid code, and browsers continue to support invalid code, we’ll eventually end up in the fragmented mess that existed before web standards and code validation became mainstream a few years ago.
Do you agree?
Here are the related articles:
The value of HTML validation by Nicholas C. Zakas (August 17, 2010)
I do believe that parts of the HTML validation service are incredibly useful, but I won’t be held hostage because I’m using custom attributes. [i.e. ARIA]
validate() || dont() by Chris Heilmann (August 17, 2010)
Most of the issues of validation are not about validating or the tools – it is about people misinterpreting the results. As there is such a gap between the standards and what browsers can do some errors being flagged up should be exceptions and not flagged up as show-stoppers.
CSS/ xhtml: does validation matter? by Bruce Lawson (November 21, 2004)
But no client has ever demanded that the pages validate – itself a sign that validation is a means rather than an end.