Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Search Engines Read CSS?

Tags:

html

css

seo

I used tag to indicate the importance of a sentence. However, it disrupted the consistency of the page style. So I change it back with CSS. The result is that to visitors it is the same but to search engines(SEs), obviously, different. And this is what SEs are annoying about.
So my question is can SEs read CSS, and further judge the whole page with it? If so,is my behavior acceptable or not by SEs.
Thank you in advance!

like image 856
tag Avatar asked Jul 23 '09 07:07

tag


2 Answers

A search engine doesn't really need to take CSS into consideration, to the best of my knowledge (except in the above examples, where CSS is being used for google-hacks).

If you style a sentence as red and the user agent defaults to blue, how would either outcome affect a search engine? Perhaps for caching (which usually includes CSS) or thumbnails or some such it might be a factor, but for search engine optimization and indexing and what not, CSS shouldn't be relevant to a SE crawler. The whole point (as I see it) of CSS is to separate the actual content (which is what should be important and what the web crawlers are looking at) from the presentation of the content (which is meant to improve the user experience). This is why questions of semantics and accessibility are so important. A good web document is one where a screen reader is just as good for presenting the content as Firefox 3.5, or where the user can turn off all CSS and still get a pretty good (albeit boring) version of the site.

For example, suppose you wanted all important sentences to be bright blue, while normal sentences are a dark grey. I am:

  • blind, and thus miss that distinction,
  • color blind, thus miss that distinction,
  • a web indexing robot, thus miss that distinction

Even if the bot can tell it's blue, that doesn't mean it's important to the bot. Nor is the font weight or italics, or a border, or being 40 pixels tall. Think of a SE crawler as a blind user. If a blind user doesn't know your sentence is important, why should a robot?

The best thing to do, as already mentioned, is to use tags that indicate importance, namely the <i> tag. While most people think that it's an outdated style tag for italicizing text, the i stands for "important" and you can set the css for all i tags with "font style: normal" to turn off the default italics. But screen readers will still add emphasis on the sentence, old browsers without CSS will italicize (which is better than nothing), and search engines will know it's important, even if that doesn't matter to their algorithm.

like image 26
Anthony Avatar answered Oct 06 '22 23:10

Anthony


Yes, at least searchengines try to determine whether you violate their rules, such as hide/fake content (such as attempting to display seemingly valid semantic content to the search engine, but actually hiding that content to users and instead displaying ads.)

Not sure how well the technology works but I'd say it is probably pretty advanced at understanding your site including CSS structure by now.

like image 138
Alex Avatar answered Oct 07 '22 00:10

Alex