Welcome to WebmasterWorld Guest from

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Descriptive CSS Tags for GoogleBot - For better indexation?

12:35 pm on May 8, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 8, 2003
posts: 516
votes: 4

I was checking the HTML code for some popular websites and noticed that they used descriptive names for css styles.

For eg -

Title would <h1 class="title"
Post matter would be <div class="entry-content"> which would end with - </div><!-- end .entry-content -->

Is this something that is done specifically for the Google Bot? How else would Google differentiate content except for the H1, H2 and H3 tags.

If not then, what are the best practices for style naming convention for a content heavy website?
1:47 pm on May 8, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Sept 16, 2009
votes: 76

Google recommend 'meaningful' style names - [google-styleguide.googlecode.com...]

Whether or not they give any brownie points for doing this is another matter.
6:46 pm on May 8, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
votes: 613

Hard to tell in isolation. Are you saying that the sites consistently apply class names to an element when there's only one of it?

Normally there would not be more than one <h1> per page. So you'd only have classes if you're using a shared stylesheet. For comparison purposes, one of my directories has <body class = "some-color"> so I don't need a separate background-color declaration in every document.

Class names should be intelligible to the person reading the code-- and to the next person coming along later. That means, no "class = 'sc'" or "class = 'g1'" and the like. I once processed an e-book whose creator had named all his css classes in Esperanto. (This is really true.) Made sense to him, I'm sure, but...

Whoops! This isn't the CSS forum is it?

Now, if you've got a "div class = 'invisible'", a savvy search engine would take a quick look at the CSS and see if there's a {visibility: hidden;}. And then set off the Cloaking buzzers.
8:39 pm on May 8, 2013 (gmt 0)

Preferred Member

5+ Year Member

joined:Jan 12, 2012
votes: 0

Best practices? Make it easy for *you* to understand your markup at a glance. I'd name your sidebar div sidebar, your header div header, your footer div footer, and your content div content. It just makes sense...

Maybe doing this also makes it easier for Google to identify the elements of your site, but I doubt they need much help there at this point.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members