Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Can a page's HTML validity affect search engine optimization (SEO)?

Assuming all other factors are exactly equal, will an HTML document with 0 errors and 0 warnings (W3C provides a tool to validate your HTML validator.w3.org) rank better than a page with 20 errors and 10 warnings?

Does markup validity apply to CSS and RSS as well?

share|improve this question

4 Answers 4

up vote 6 down vote accepted

Having valid HTML and/or CSS probably isn't a ranking factor. However, it is recommended that your code validate as it helps to ensure your content is properly crawled and indexed. Invalid HTML code can break a crawler just like it can break in a browser. As a result you should try your best to ensure your code is valid and easily read/crawled/interpreted by the search engines.

share|improve this answer

For websites, following the spirit of the rules is more important than getting a perfectly validating page. (Once the site works as intended, getting 100% validation may be a waste of effort.)

Said another way: don't optimise for search engines - optimise for humans and ultimately an increased search position will follow.


However, when it comes to RSS, invalid XML might prevent your feed from being syndicated by clients, so less people will see your articles, visit your site, and thus can't share with others - so it's a good idea to make sure that your RSS works fully.

share|improve this answer

If no information is lost and the rendering is not badly broken, valid HTML is not that important for ranking/SEO.

Watch this video from Google Webmasters Help for a better explanation: Is HTML validation necessary for ranking?

share|improve this answer
1  
P.S. For a lot of reasons it's still a good idea to have valid markup. –  Paolo Feb 8 '12 at 18:32

Even the great Google.com homepage has W3C errors. Its good to have little to no errors but will this help your search engine rankings....?

Probably not. There are over 200 ranking factors and clean code is surely one of them. But it will have very little if any affect on SERPS. There are more important factors....

You need to make sure your onpage optimization is up to par: 1)page titles 2)url structure 3)meta 4)content 5)images

and so on and so forth.

share|improve this answer
4  
Meta tags have no seo value and images are not a ranking factor. –  John Conde Oct 5 '11 at 17:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.