homepage Welcome to WebmasterWorld Guest from 54.166.255.168
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Marketing and Biz Dev / General Search Engine Marketing Issues
Forum Library, Charter, Moderators: mademetop

General Search Engine Marketing Issues Forum

    
Use of proper ID / CSS class name is SEO!
foxfox

5+ Year Member



 
Msg#: 3590964 posted 4:44 pm on Mar 4, 2008 (gmt 0)

This is quite interesting, I debate with my co-worker for the coding style of CSS today...

let say, which one should be used?

1. <div id="mainBody"> ... </div>
2. <div id="main_body"> ... </div>
3. <div id="main-body"> ... </div>

I say (3), why?

It is obvious, a spider like Google can split up URL by hyphen, not not underscore or nospace, so why don't they do the same way as ID or class name?

The bottomline is: it didn't hurt anything.

 

Receptional Andy



 
Msg#: 3590964 posted 4:53 pm on Mar 4, 2008 (gmt 0)

IMO this is more to do with programming naming conventions than SEO.

I usually rule out 1. since it can cause confusion about case sensitivity.

Similarly, in programming hyphens are usually used as a minus operator. I favour underscores for such usage, since I feel it avoids any confusion, and any potential for clashes if you need to process the data with another programming language.

Robert Charlton

WebmasterWorld Administrator robert_charlton us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 3590964 posted 8:13 pm on Mar 5, 2008 (gmt 0)

It is obvious, a spider like Google can split up URL by hyphen, not not underscore or nospace, so why don't they do the same way as ID or class name?

This shouldn't have anything to do with SEO. Google doesn't show code in its index, albeit they may look at it behind the scenes.

Regarding the hyphen, why should anyone care whether Google can parse words in a div id name? Are we trying to rank on "main" or on "body"? ;)

MadeWillis

5+ Year Member



 
Msg#: 3590964 posted 8:17 pm on Mar 5, 2008 (gmt 0)

Also, Google can "split up" words with both hyphens and underscores.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Marketing and Biz Dev / General Search Engine Marketing Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved