W3C compliance – is it a requirement?

A term often busied by web developers and also SEO agencies is W3C compliance. I’ve written about the benefits of W3C compliant code before, but my perspective has changed a bit over time and I feel it’s important to point out that full W3C compliance is not a definitive requirement for an effective website.

W3C compliance basically means that the HTML and CSS code that a website is built with is fully compliant with the standards set by the World Wide Web Consortium (W3C for short).

The W3C is an international standards organization, founded by the inventor of the web. They develop the standards on which the world wide web is run.

You’d think that making sure your website’s code complies fully with these standards is pretty important. And it is, up to a certain point.

You can easily find out if your website’s code is W3C compliant – simply submit your website URL to the W3C Validator tool and you’ll get an overview of all the ‘errors’ in your code. And you’ll almost certainly get a lot of ‘errors’. It’s very unlikely your website’s code complies to all of the W3C’s standards.

I say ‘errors’ because often they’re not really errors. The W3C standards are extremely strict, with no room for interpretation. So every little niggle in your code, every small deviation from the W3C’s strict standards, will generate an error in this validation tool.

W3C compliance for browsers

But most web browsers are flexible pieces of software that are built to deal with a wide range of different sorts of HTML and CSS code, and will probably render your website perfectly regardless of how many errors the validation tool shows.

Often web developers have to use shortcuts and non-compliant code to make something work in a particular way on a website, and while this results in validation errors it doesn’t hinder a website’s functionality at all. Quite the contrary, sometimes you have to break the rules of the W3C to get something to work exactly how you want it in every web browser.

W3C compliance for SEO

There is also the misconception that search engine crawlers require a website’s code to be 100% W3C compliant, or else they will rank your site lower in the SERPs. A lot of SEO agencies recommend you make every webpage on your site fully W3C compliant.

This is often a costly endeavour, and quite unnecessary. Search engine crawlers, like browsers, are sturdy and flexible pieces of software that can index almost any type of code, regardless of the errors it contains.

For proper crawling and indexation a search engine will need to be able to distinguish the different elements of a webpage – style, navigation, and content – and will need to be able to interpret the meaning of the content, which it does through analysing the content itself and the mark-up code that is used to style the content.

Clean, compliant HTML and CSS code help in this process. Compliant code makes it easier for search engine crawlers to identify what the content on a webpage is, and what that content means.

But 100% compliance, meaning zero errors in the W3C validation tool, is not only often hard to achieve (especially if your website has advanced functionality) but is unnecessary as well. The code just needs to be sufficiently well-structured and tidy enough for search engines to be able to distinguish style, navigation, and content.

So bad code is OK?

No, bad code is not OK. It’s still a good idea to strive towards compliant code. A website with hundreds of W3C validation errors is not a good thing. It’s likely that these errors cause the site to display differently in some web browsers (or worse, not work at all) and can cause all sorts of trouble for both users and search engines.

But if your website’s code only shows a couple of handfuls of non-critical errors, especially if they’re only small warnings, there really is little need to fix them.

For on-site optimisation your time and resources are better spent on making sure your website’s title tags, content, and other factors are fully optimised.

Comments

The W3C compliance is a SEO factor. I had a client in Mexico that his Website’s PHP code was terrible, We chaged everything, We built the Website from 0 but we kept the same Urls, same day we chaged the code, his visits jumped 500% and staed there. after I had some problem with one his manager and we stop working with them, after they changed back to the old code now they have very few visits.
This proves me that the clean code is a SEO factor.

@Rafael – Clean code, yes. As I say in the last few paragraphs, it’s good to strive towards compliant code as it helps search engines with crawling & indexation.

But full 100% compliance is not an SEO requirement. Matt Cutts from Google has even come out and said that fully compliant code is not a ranking factor. As I say in my article, as long as the code is clean enough to distinguish style, navigation, and content, that’s as far as is necessary from a purely SEO point of view.

Thank you so much for this insightful article! After the w3c checker battered me with red notifications that my website had not passed any of its tests – even though it only showed 9 seemingly small style problems – it was like a balm to my soul.

The site itself has been performing well but, in the interests of trying to toe the official line for my client, I have just spent two hours trying to eradicate the errors in other people’s plugins and codes whilst retaining the feel of the page in Chrome and Firefox, only to discover that IE seemed to be using a code to which I clearly had no access since it certainly wasn’t obeying any commands that I had given it :(

Add to that the disclaimer on the w3c site that it is ‘not always reliable’!!!

I was so incensed at the waste of my time that I decided to write a post about w3c but, there in my notes which have accumulated on the subject over a period of some months, was a link to your post… resulting in the resuscitation of my sanity.

Great article. I always strive to ensure my websites are 100% validated to Transitional but i never really bother with Strict as I don’t see any real benefit to this.

I agree its important to aim towards 100% but if I wanted something on a site which would cause the site to become invalid, I would try to find a work around but I certainly wouldn’t lose any sleep over it!

Good points about perfect CSS & HTML not being necessary. However, learning how to code things cleanly and properly will actually reduce the time you spend doing coding. It’s much easier to understand and can take up a lot less lines. My first website had a couple hundred errors (especially due to using table formatting of my site, instead of using CSS formatting). When I totally redid the site, I think I was able to get it down to zero errors. Not only was it a lot easier to make the site; also, if I want to make changes to styling, they’re all controlled by one CSS page, so that saves a huge amount of time. But again, a bit of code like “-webkit-border-radius:13px;-moz-border-radius:13px;border-radius:13px;” in the CSS in order to ensure that you get cross-browser compatibility is a PLUS rather than a MINUS, even though it may show up as an “error.”