PDA

View Full Version : Do google robots read CSS files?


Robert
15th February 2006, 08:53
Or do they stick to the HTML files?

Coding Monkey
15th February 2006, 09:37
Interesting question.

I would not be surprised if they checked the CSS files, to try and avoid certain blackhat techniques, such as hiding text. However, there are so many methods you can use to hiding text, that it still isn't a very effective method.

Any reason you ask?

Robert
15th February 2006, 09:45
I want to use <h1> tags for each product title in my webshop. But the standard size <h1> is too big.....

It really IS the most important thing on the page, so worthy of a H1 tag...

DavidHorn
15th February 2006, 09:48
Well, you'll still have the H1 tag within the HTML, no matter how it gets styled in the CSS form. Google still sees H1 on your web page.

Coding Monkey
15th February 2006, 09:48
I don't quite understand why you're worried. Google doesn't take any notice of your site design, it just provides relevant content based on the text. If you have in your CSS file

h1 {
font-size: 0.6em;
}

It will make it smaller to the user, and Google wouldn't care about that. It's the fact that it's in an <h1> tag that matters.

Hope that makes sense.

DavidHorn
15th February 2006, 09:49
(sorry, Tom - didn't mean to butt in!)

Robert
15th February 2006, 09:51
H1 tags are not just normal text though, they are treated differently. I'm worried that if I make my H1 tags smaller Google may think I'm trying to inflate the importance of ordinary text.

Coding Monkey
15th February 2006, 09:54
No problem, David ;) The more opinions the better

As long as you use them as <h1> tags, it won't matter what size they are. If you suddenly do an entire paragraph in h1 tags, you basically deflate the purpose of them in SEO terms and general web usage.

Robert
15th February 2006, 10:05
OK then I have nothing to worry about! :)

You know how it is. I don't want to bugger up my google ranking by trying to make it better!

DavidHorn
15th February 2006, 10:06
Tom's absolutely right ... and in general, you should probably stick to just having 1 H1 tag per page ... that's what it's there for - to highlight the most important thing on the page. Sub headings are, therefore, going to be H2 tags, and descriptive text appears as paragraphs. That's what makes up a sematically structured document.

I'd avoid multiple use of H1 tags on a page, and set a proper heirarchy for the page you're working on. (Now, plenty of standards compliant sites - including some of my own, for sure - have multiple H1's on a page, I'm just saying how it 'should' be done!)

David

Coding Monkey
15th February 2006, 10:11
Agreed with David. You're meant to go h1, h2, h3 etc etc according to the best practice. However, sometimes this just isn't practical, as I often split up paragraphs with h2 tags, instead of going down into h3 and so forth.

Glad we got that one sorted. Onto the next question ;)

Tin
15th February 2006, 10:20
I'd like to add to what has already been said in that...
from an seo perspective don't slap a "class" into the tag but style the H1 itself the way you want it displayed on the page so that the H1 is 'clean' if you follow me.
Use only 1 H1 tag per page although it's perfectly ok to use a couple of H2's on the same page should the need arise, again, style the tags cleanly.

:-)

Robert
15th February 2006, 10:20
Well it's brought up another question!

If my page looks like....


Heading
Paragraph

Heading
Paragraph

Heading
Paragraph

Heading
Paragraph


SHould I use H1's or H2's? Should I only use a H2 as a subset of a H1?

Coding Monkey
15th February 2006, 10:23
I would do thus:

<h1>My Main Heading!</h1>


Stuff about it. My intro. Keywords and stuff, please</p>

<h2></h2>


More stuff</p>

<h2></h2>

Etc etc. You could go onto h3, h4, h5 if you want.

Tin
15th February 2006, 10:23
Completely agree Mac :-)

Robert
15th February 2006, 10:29
But you've just changed what my pages looks like - LOL :)

Coding Monkey
15th February 2006, 10:39
As the Rolling Stones once said: you can't always get what you want. ;)

GreeceMonkey
12th May 2009, 14:50
I know this question is relly old, but I just read it. I did some test using the display:none css property, with the css hosted on a different domain. This ment I could write keywords in the HTML and hide them using a CSS - it was never followed or checked by Google

edmondscommerce
12th May 2009, 16:53
for now...

definitely not a recommended tactic

FireFleur
12th May 2009, 17:00
Just so this is not thought of as being some logical truth.

Google not checking the cross domain URL is quite hard to determine but let's assume that is true in the example given.

What it can do is mark the URL where other URLs are elements of and it hasn't processed or retrieved as suspect.

GreeceMonkey
13th May 2009, 00:02
I am not recommending this is a tactic, I am not suggesting that at all.

This is what I did, I used one of my domains names, created a frontpage added it to google sitemaps, and referanced a CSS in another domain.

The sitemap was regulaly uploaded, and so the site was also visited by google many times a day. You can actually force a visit from google by resubmitting the sitemap.

I used IIS logs, and LAN sniffers and at no point in the first 60 days did google bots 'view' the css file.

I do think they will have to start doing this now, as this is now a major part of the look and feel / quality of the site, and it is possible to have text in the html that is not on the screen - but by my tests - more out of curisoty than anything else, they do not cross referance the two files.

Sorry about the spelling, I be on the PC all night
Graham

edmondscommerce
13th May 2009, 09:03
Hi Graham

OK thanks for the clarification..

For SEO's and those that know what they are doing and are prepared to dabble on the grey side ;-) this is interesting..

for Joe webmaster though I think these kinds of tactics are to be avoided. I say that more for the benefit of anyone else who would stumble across this thread and be tempted to try it on their own site