The Two Great Things About Validation
Post from January 30, 2009 (↻ December 12, 2016), filed under Web Development.
This and many other posts are also available as a pretty, well-behaved e-book: On Web Development.
There are two great things about validation: Validating helps technical understanding as it contributes to awareness of the underlying specifications, and writing valid code is a sign of professionalism.
Put another way, developers who don’t validate miss important opportunities to learn, and invalid code can in most cases be considered unprofessional.
However, invalid code doesn’t necessarily mean inaccessible or unmaintainable code. That’s a myth. You can invert that statement, too, though: Valid code doesn’t mean accessible or maintainable code, nor efficient or fast code. Anyone stating that is wrong or has different motives, as the advantages of and great things about validation are, see above.
From my comment on Valid sites work better (?). Revised.
I’m Jens Oliver Meiert, and I’m a web developer and author. I love trying things, including in the fields of philosophy, art, and adventure. Here on meiert.com I share some of my thoughts and experiences.
If you have any suggestions or questions about what I write, leave a comment or a message.
it looks like our CMS ate your comment or something to that effect, I can’t see your comment in the (empty) pending queue. Can you resend?
Published! Thanks Jens for your patience.
I find it a bit scary that comments migh be lost like that, though…
Excellent post - and right to the point.
Replace “validation” with “alt text in HTML 5″ and you pretty much sum up my thoughts on that point also. Alt doesn’t make it accessible and missing alt doesn’t make it inaccessible, but having a guideline for implementing it educates, supports accessibility, and is professional.
Although I would agree that invalid code doesn’t have to mean inaccessible or unmaintainable code, I would say that valid code is definitely easier to maintain.
The big link between accessibility and validation is that valid code should behave more predictably across different browsers than invalid code. Of course that is a utopian view as browsers don’t just treat invalid code differently.
On July 7, 2013, 2:18 CEST, Alistair Lattimore said:
I agree valid code is a sign of professionalism but it can’t be a black and white scenario, as a lot of publishing platforms still get in the road of idealistic outcomes like W3C validation.
I say idealistic because browsers are largely indifferent to valid HTML versus invalid HTML, rightly or wrongly - that is just how things are.
Given that browsers are so tolerant of valid or invalid HTML/CSS, what would you prefer in general:
1) lean but invalid HTML/CSS or;
2) bloated but valid HTML/CSS
Have a look at the most popular posts, possibly including:
Perhaps my most relevant book: CSS Optimization Basics (2018). Writing CSS is a craft. As craftspeople we strive to write high quality CSS. In CSS Optimization Basics I lay out the, at least some of the most important aspects of such CSS.
Looking for a way to comment? Comments have been disabled, unfortunately.