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

SEO seems to be a subject surrounded by both myths and varying opinions. Nevertheless, I would like to know if you have an opinion on how important it is to have semantically correct XHTML, that is, well-formed and valid XHTML, with regards to SEO.

share|improve this question
    
Semantic means using the right tags where they are needed. For example using <blockquote> instead of <div class="quote">. It has nothing to do with validation. –  Alin Purcaru Dec 2 '10 at 15:19
add comment

migrated from stackoverflow.com Dec 2 '10 at 15:20

This question came from our site for professional and enthusiast programmers.

6 Answers

up vote 6 down vote accepted
  1. Well formed (x)HTML means there's less of a chance that the crawlers will incorrectly parse your documents. Poorly written (x)HTML leaves the possibility open that the crawlers either cannot interpret, or misinterpret your page's content causing the page to not be indexed or to be indexed incorrectly (to your detriment).
  2. The clues given by (x)HTML is a very large part of ranking algorithms. It's a big reason why flash isn't ever going to be as SE-friendly as(x)HTML. It simply lacks the ability to give strong clues to the search engines about the page's content (notice I didn't say Flash couldn't be crawled or indexed). For example, <abbr title="International Business Machines >IBM</abbr> tells the search engines that IBM is short for International Business Machines. This helps them associate the two. (Not coincidentally this is also good for users).
  3. Page speed matters. Poorly writtn (x)HTML means it will take longer for your pages to render. If your pages take too long you run the risk of having your pages penalized (you need to be in the bottom 1% for this to happen and poor (x)HTML won't do this on its own but when combined with other factors it certainly doesn't help you in this respect).
  4. If your (x)HTML is properly written you can take advantage of microformats. But if you can't get your (x)HTML to format properly you certainly aren't going to get microformats to work for you.
share|improve this answer
    
Good answer. I'd add some perspective in that it's obvious by looking at Google search results that this is not a very important factor -- Google cares about users, so other user-centred factors (rather than technical factors) are more important. The goal of total validation is a misuse of resources (the time could be spent more effectively improving other factors that will make the site more effective in search engines). –  anthonyg Dec 3 '10 at 1:25
    
+1 for point #4. IMO microformats provide more valuable metadata than any semantic data included as part of the xHTML formatting, and this is pretty well demonstrated by the information now shown by Google in search results (see recipes, especially). –  Chris Adragna Dec 3 '10 at 4:37
add comment

Some search engines will give you penalty points for mismatched doctypes, encodings, botched HTML, etc...

share|improve this answer
2  
I'd love to see a source for this <strike>(mis)</strike>information –  John Conde Dec 2 '10 at 15:31
    
@John For example seznam.cz will ignore your pages if they have different encoding then they claim and only supported encodings are UTF-8, iso-8859-2, windows-1250 –  Let_Me_Be Dec 2 '10 at 15:37
    
Good enough for me. Thanks for the info. :) –  John Conde Dec 2 '10 at 15:39
add comment

If you want your XHTML to be properly parsed and "well understood" by the search engine crawler/indexer, then yes...it is important.

The major search engines should be able to handle minor issues but those types of mistakes may or may not hurt your ranking depending on which search engine you're talking about.

share|improve this answer
    
Thanks for your answer. Do you know if there are any well known sources that state this? –  Clean Dec 2 '10 at 15:18
add comment

Not only does it help the search engine "understand" your content, usually correct code is less obtrusive and therefore makes up less of the page. At least with Google, your code to content ratio affects your score, so it's another vote for good clean (minimal) code.

share|improve this answer
add comment

You should try to write semantic and valid XHTML even without regards to SEO, as it helps to keep your code clean.

As for search engines, Google uses very complex algorithms to rank your site, and validity & semantic code will definitely be amongs them. Nobody except for Google can tell you exactly how much does it matter, but it will definitely help.

share|improve this answer
add comment

Since the question was how important, tha answer would be it is of minor importance, as long as your code is not a validation nightmare

share|improve this answer
add comment

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.