W3C Validation Errors and How They Relate to SEO
With the dawn of DIY website design options, business owners on a budget can quickly and easily put together a website with relative ease, without having to know a single bit of HTML or other code. That sounds great and all, but that means there’s no real control over the HTML that’s used to build the site. As such, the resulting code could be full of W3C validation errors, which in turn, indirectly harms SEO.
What is W3C Validation?
The World Wide Web Consortium, known as W3C allows users to check HTML and XHTML documents for properly formatted markup. Taking the time to validate your markup goes a long way to ensure high technical quality of your web pages.
W3C validation is the process of checking your website’s code to determine if it follows the correct formatting standards. Failure to validate your code against these standards could mean your website suffers errors or your traffic numbers aren’t as high as they could be due to poor readability.
What Does Google Say About It?
Google’s support page on the importance of browser compatibility states:
“Although we do recommend using valid HTML, it’s not likely to be a factor in how Google crawls and indexes your site.”
And in 2017, when Google’s John Mueller was asked whether valid HTML played a role in ranking, his response was clear:
“As long as it can be rendered and SD extracted: validation pretty much doesn’t matter.”
The reality is, most websites don’t validate and the internet runs just fine. So if Google says it’s not a big deal, why should you even care about validating your HTML?
Reasons to Validate Your HTML
Could Affect Crawl Rate
According to a Google Search Console support page, Google says drops in crawl rate and indexing could be a result of invalid HTML.
“Broken HTML or unsupported content on your pages: If Googlebot can’t parse the content of the page… it won’t be able to crawl them. Use Fetch as Google to see how Googlebot sees your page.”
Impacts Browser Compatibility
Another support page reveals that Google encourages valid HTML to ensure web pages render correctly. The GoogleBot renders your site as a browser, so valid HTML ensures your website renders correctly across all browsers.
“Clean, valid HTML is a good insurance policy, and using CSS separates presentation from content, and can help pages render and load faster.”
Promotes a Good User Experience
It’s clear that Google places user experience as a ranking signal. That’s why mobile-friendly guidelines are in place, and for addressing the number of popups and ads on a page. Because valid HTML may have an indirect effect on user experience, and that in turn creates a positive user experience because the page renders well and quickly, this could impact SEO.
Allows Pages to Function Everywhere
Improperly coded HTML causes the browser to act quirky. It sends the browser into a frenzy making changes to how the page is rendered. Most of the time, the page can render just fine, but sometimes it means the page doesn’t function correctly.
Invalid HTML in the Head Section Breaks Hreflang
In a 2016 Webmaster Hangout, someone asked why Google wasn’t picking up his Hreflang tag, the tag that tells Google what language you’re using on a specific page for international audiences. Mueller said that invalid code in the head section of a web page’s code could break Google’s crawl, and cause it not to index the hreflang tags.
He explains it like this:
“So it might just be that we don’t recognize the hreflang markup at all on those pages. For example, what might happen is we can crawl and index those pages. But when we render those pages something in the head section of the pages is added early on and that kind of breaks everything within the head, which includes the hreflang markup.”
Helpful for Google Shopping Ads
If you have a product you want to advertise in Google Shopping, then you’d better be using valid HTML. The Google Merchant Center support page recommends it:
“Use valid HTML. We also detect the price that you’re displaying based on the structure of your landing page. Using valid HTML helps ensure that we detect the correct price. …Use the W3C validation service to check your HTML.”
While Google says they don’t use valid HTML as a ranking factor, there is plenty of reason to make sure your code is correct, anyway. It can cause several issues with your site’s functionality, which may indirectly influence your ranking.