google rankings

I have a question for webmasters out there who have some experience with SEO. How does Google treat the following? a) Text that has class=”foo” where class foo is undefined. b) HTML comments (including IE’s conditional comments). My expectation is that it that for (a), class foo will be ignored entirely (no loss or gain … Continue reading “google rankings”

I have a question for webmasters out there who have some experience with SEO. How does Google treat the following?

a) Text that has class=”foo” where class foo is undefined.
b) HTML comments (including IE’s conditional comments).

My expectation is that it that for (a), class foo will be ignored entirely (no loss or gain in terms of SEO), and that HTML comments (including conditional comments) are also ignored entirely.

Does anyone have evidence to the contrary? Maybe some Mozilla folks out there know about this. I’m not worried about this for my blog, but another site that is considering advertising Firefox in place of some normal header text. For them, even marginal loss in terms of SEO may place it below another competing site (which would be unacceptable). Thanks in advance for your input.

10 thoughts on “google rankings”

  1. > Text that has class=”foo” where
    > class foo is undefined.

    There is no means in HTML to predefine a list of allowed classes. What do you mean by “undefined”?

  2. There’s no corresponding style declared anywhere, I assume. As Colin says, I don’t think Google takes either into account. The logic required to give extra weight to terms used in whatever div a site uses as its header — taking into account all of the different class names people give them — would be enormous.

  3. > I mean that I’m using class=”foo”, where I
    > don’t define a called called foo anywhere.
    > Nothing to with allowed or disallowed.

    But I must ask again, what do you mean by “define”? How does one define a class? I do not understand your terminology.

  4. For example, usually if I have a class foo, then I’ll have something like this in my CSS:

    .foo { attribute: value }

    and then use a <div class=”foo”> somewhere. But what if I use <div class=”foo”> without having .foo { attribute: value } anywhere in my CSS. That’s what I mean. I don’t know how to explain it any clearer than that.

  5. A Search Engine will still “see” the text included in your class. It doesn’t give a dam on classes. Therefore you can feed search engines with {display:none;} or {visibility:hidden;}, what is still indexed.

  6. Yeah, but I’d say if search engines do ever start reading corresponding style information, that last one will be the first one to be checked for. It’s basically the old keyword spam trick that they do check (and penalise) for, carried out thusly:

    spam keywords

  7. Ah, by “define a class” you mean applying CSS rules to elements with that class. Me sees. Note that classes have many other uses than hooks for stylesheets, tho’.

Comments are closed.