Forum Moderators: phranque

Message Too Old, No Replies

CSS "id" and "class" good for SEO?

         

zulufox

9:11 pm on Aug 8, 2004 (gmt 0)

10+ Year Member



when choosing a name for id and class names, should I choose keywords to help with sEO?

Is this against the guidelines?

Krapulator

6:14 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It will make absolutely no difference to SEO at all.

You should choose names that reflect the semantic content of that section. eg: id="leftMenu" class="footerNotes"

Don't use any underscores in your class and id names (common mistake).

goodroi

2:25 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Currently the big search engines don't reward that. However there is nothing to lose other than possibly confusing yourself as you need to maintain the site.

GaryK

4:13 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't use any underscores in your class and id names (common mistake).

That's the first time I've seen this mentioned. I use underscores all the time as a way to group styles according to what they do. For example, a full width table might be defined: table.Width_Full or table.Width_Dynamic. I've never had a problem with this that I know of and it passes all the XHTML validation services I use.

Please tell me what I'm missing or where I can read more about it. Thanks.

skippy

4:38 pm on Aug 9, 2004 (gmt 0)

10+ Year Member



Don't use any underscores in your class and id names (common mistake).

The “ _ “ is treated by the SE as that. If it your desire is to use a separator for SEO purposes use a “-“.

There are a number of threads here about this. Just do a search.

GaryK

5:00 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I did a search. Now I have more questions than I did before. I'm going to start a new thread in the CSS forum where my question will be more appropriate. Thanks for your information and help.