Above – Google Confirming this 2008 blog post advice.
Does Google rank a page higher because of valid code? The short answer is no, even though I tested it on a small scale test with different results.
Google doesn’t care if your page is valid html and valid css. This is clear – check any top ten results in Google and you will probably see that most contain invalid HTML or CSS. I love creating accessible websites but they are a bit of a pain to manage when you have multiple authors or developers on a site.
If your site is so badly designed with a lot of invalid code even Google and browsers cannot read it, then you have a problem.
Where possible, if commissioning a new website, demand at least minimum accessibility compliance on a site (there are three levels of priority to meet), and aim for valid html and css. Actually this is the law in some countries although you would not know it, and be prepared to put a bit of work in to keep your rating.
Valid HTML and CSS are a pillar of best practice website optimisation, not strictly search engine optimisation (SEO). It is one form of optimisation Google will not penalise you for.
Where can you test the accessibility of your website – Cynthia Says – http://www.contentquality.com/ – not for the faint hearted! :)
Addition – I will be following W3C recommendations that actually help seo;