When trying to create perfect HTML code it is easy to make mistakes.
This means that the code may not validate correctly every time it is used. Google Webmasters tool gives the user the ability to validate your HTML code, to check if there are any errors. This has raised the issue about how important it is to have validated code.
Obviously having valid HTML will benefit your sites performance, but in practice not all code written can be perfect. Looking at this from an SEO perspective, does having invalid code affect your sites rankings? This was the topic of the latest Google webmaster help video.
Matt Cutts has once again stepped up and helped explain that it is best to validate. He says that validating code makes it easier when you want to upgrade. Also it makes it easier if you want to hand the code onto someone else.
Validating code goes without saying to professional coders who strive to make every piece of code work perfectly. However there are a lot more people out there who have imperfect HTML code, but still rank highly on Google.
Cutts explained that Google indexes all available webpages and therefore Google’s webcrawler has to compensate for badly coded HTML. If Google did rate validated code higher, then it would actually hurt search quality. Therefore currently having valid or invalid code doesn’t affect your search rankings, but he does warn this may change in the future, so beware.