SEO and Valid HTML: How Critical Are W3C Standards?

Woman screaming in terror at the Google logo

If I made a list of requests from new SEO hires, “Fix these HTML errors from the W3C validation tool” would be in the top 5. Thankfully, John Mueller took time in the latest Google Webmaster Central hangout to address the ranking importance (and intended meaning) of “valid HTML” in Search Engine Optimization. He helpfully described the SEO situations well-written HTML avoids, each of which has its own testing tool from Google.

an HTML error from the w3c validation tool

In my top 5 responses: “Stop piling affiliate tags (like above imported code) onto your pages.”



Stand Down: Not A Ranking Factor

The first words out of Mr. Mueller’s mouth were the sweetest to hear: “valid HTML is not directly a ranking factor.” Don’t get me wrong, our developers are sticklers about standards and well-written code, but we’ve learned the phrase “this may be a ranking factor” makes SEOs go a little wild-eyed and start foaming at the mouth. Add to that the fact that the W3C Validation Tool sometimes presents messages that look scary out of context (Why am I getting an http-equiv error? Well, your customers still use chrome frames) or include third party code we can’t control (like the above affiliate script), and it’s a recipe for conflict.

Valid HTML is not directly a ranking factor, lessening the pressure slightly, but why does Google recommend the W3C validation tool? Mr. Mueller explained that Google Webmaster documentation used to say “correct HTML”, but “correct” is difficult to quantify. “Valid HTML” and the W3C Validation Tool give developers a quantifiable tool to measure the machine-readability of their code.

What Google Wants From Your HTML

Mr. Mueller described three scenarios where poorly-written HTML can indirectly affect page rankings:

  1. Basic Crawling. If a page uses really broken HTML (which is rare), Googlebot and other search engines have difficultly crawling and understanding the page. This is pretty obvious, but chances are if your HTML is too broken for a search engine crawler, it’s too broken to actually visit and use.
  2. Structured Data. Implementing structured data (generally microdata in the HTML) becomes exponentially harder if your base HTML makes no sense. Google has a tool especially for testing structured data effectiveness, so check out the Structured Data Testing Tool if this is your true HTML worry.
  3. Mobile Friendliness. Since mobile-friendliness is an actual mobile ranking factor, knowing that your code works well on all devices is a definite SEO goal. Truly broken or outdated HTML is far less likely to be understood by modern browsers and devices; however, a W3C error doesn’t automatically disqualify your site. My http-equiv error example earlier is part of the “outdated” squad — deprecated technology that is no longer a standard, though outdated HTML can be useful if your target demographic is actively using it. In e-commerce, even 3% of conversions coming from deprecated technology often means supporting old code standards far longer than we’d like to. If your concern is over mobile-friendliness as a ranking factor, use Google’s Mobile-Friendly Testing Tool.

What I’m Saying Is…

An SEO or developer should absolutely use every tool at their disposal to be sure their work is as helpful to users as possible. More important than the tool or report is knowing how to interpret the results, judge them by context, and discern which aspects are worthy of attention. I’m grateful that John Mueller placed this particular standard in SEO context and clarified the intent.