This is more for interest sake than anything else, since I assume it will make very little difference, but I was wondering whether there is any evidence that search engines (Google, Yahoo!, Bing, for example) use the class names and id's of HTML elements as clues to the content?

Would it make any difference, say, to change id="left_column" to id="news_column" ?

  • Interesting question, but we will never know. All we can do is speculate...
    – Pekka
    Commented Jan 29, 2011 at 23:27
  • It's true, it's not easy to know. But it is possible to make reasonable deductions based on making such changes in your code. I was wondering whether anyone has tried and seen those changes reflected in results.
    – PhantomVader
    Commented Jan 29, 2011 at 23:28
  • Voting to migrate to webmasters.stackexchange.com
    – Kirk Woll
    Commented Jan 29, 2011 at 23:59
  • Search engines do use microdata (can be applied to any element, though observation of schema.org formats offers higher likelihood of support)
    – danlefree
    Commented Aug 16, 2012 at 8:30

4 Answers 4


I've never come across any evidence for this.

I think you're safe assuming it won't bring you any extra SEO benefits as it's something that anyone could do (regardless of the domain or content). You're best off focusing your energies into things that will certainly help: ensuring your pages well-optimised for your target queries, ensuring you've got lots of unique and regularly-updating content, and generating inbound links.

Your SEO success will not come down to hackery or doing clever little tweaks that give you some secret edge. It's just about lots of good content, organised in a way that makes sense for crawlers, and building as many links as you can to your pages with good anchor text.

Source: personal experience working with big sites


I don't think so because that would bring about a lot of false positives. I suspect they could have some advanced method where they detect the most immediate element/parent of text nodes and another advanced algorithm to see if the name/id corresponds with a list such as ['content', 'main-content'].

But seeing as how every site has a different id/name and some sites even lack it, I don't think they rely on that as much, if not at all.

You should always use the most semantic/meaningful value for an id/class anyway, regardless of what the SE/spider does. It would absolutely not make sense for an SE/spider to devalue/demerit solely based on the id/class value changing or not being a certain value.

  • I like your comment that it would not make sense for a SE to devalue/demerit based on id/class value. You wouldn't expect a site to be rated lower than another as a result of bad class names, but then again, all else being equal...it might just make a difference. However, semantically meaningful class- and id names aren't always the best in terms of code - the contents of a container could change over time, and you shouldn't need to go update your html and css based on these changes.
    – PhantomVader
    Commented Jan 29, 2011 at 23:58

I have heard nothing to suggest they do, otherwise someone in the SEO industry would have said something by now (they'd be famous!). Per the W3C specs the class and id attributes are not intended to provide semantic meaning the way title or alt does, they are really there just for developers / designers.

You may find this interesting, Google did a Web Authoring Statistics survey. It shows the usage of all different kinds of elements, classes, etc.


Sorry but I don't have time to find the link at the moment but I came across something recently saying id's can be indexed in HTML5, so it might depend on the doctype, but I think it is more relevant now than in the past.

  • 1
    This really needs a citation link. You're not even stating it as your own opinion, just "I saw a thing once, somewhere."
    – Su'
    Commented Aug 16, 2012 at 3:32
  • I am in the midst of a redesign and spending a lot of time on HTML5 Rocks, HTML5Boilerplate, and Modernizr, (and here) at the moment. But it doesn't matter I hand code semantic, logical, intelligible
    – adam-asdf
    Commented Aug 16, 2012 at 19:59
  • It's not clear what you think that proves or what relevance it has to the question.
    – Su'
    Commented Aug 16, 2012 at 20:03
  • ...Got cut off...I did a Google search and honestly, didn't find any reputable references, But it doesn't matter I hand code semantic, logical, human-friendly ids as needed (when possible) anyway--most any source will say that is good practice. If they aren't directly indexed would you neglect them? I wouldn't.
    – adam-asdf
    Commented Aug 16, 2012 at 20:07
  • googlewebmastercentral.blogspot.com/2009/09/…
    – adam-asdf
    Commented Aug 17, 2012 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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