Google’s John Mueller said in a Google Hangout that it is better to have a website with valid HTML:
“This came up recently with the change of the guidelines, with regards to change made in the webmaster guidelines. We mentioned ‘use valid HTML’. The question here is: is the W3C Validation (Broken HTML) ranking factor or should we care about it?
It is not directly a ranking factor. It is not the sense that if your site is not using valid HTML we will remove it from he index. Because I think we will have a pretty empty search results.
But there are a few aspects there that do come into play. On the one hand, a site with really broken HTML, something that we see really rarely, then it is really hard for us to crawl it and index the content because we can’t pick it up.
The other two aspects which are kind more in regards to structured data. Sometimes it is really hard to pick up the structured data when the HTML is broken completely. So you can’t easily use a validator for the structured data.
The other thing is in regards to mobile devices and cross browser support is if you have broken HTML then that is sometimes really hard to render on newer devices.”
This video confirmed a shorter statement that John Mueller made the day before:
What does this mean exactly?
This means that there is no penalty for broken HTML code. Google can handle a lot of HTML errors. However, some HTML errors make it hard for Google to index your web pages.
Other HTML errors can cause problems with structured data markup, other errors can cause display issues on mobile devices.
For that reason, it is much better to make sure that your web pages use valid HTML. Valid HTML is a sign of a high quality website.
There are many more factors
There are many factors that influence the position of your web pages on Google and other search engines. The website audit tool in SEOprofiler helps you to make sure that your web pages do not contain critical errors. If you haven’t done it yet, try SEOprofiler now: