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.