• Notice regarding image hosts and attachments. See here.

images as h1?

Soldato
Joined
7 Jan 2007
Posts
10,680
Location
Sussex, UK
Hi,

I'm using css to display a nice styled text image as my h1 tags, I'm not doing anything bad with spamming text in the proper h1 tags, it's a sesnible 3 words long.

Does google mind this?

PHP:
#wrapper h1 {
	background-attachment:scroll;
	background-color:transparent;
	background-image: url(/images/h1-image.png);
	background-position: 0% 0%;
	background-repeat: no-repeat;
	height: 1px;
	overflow-x: hidden;
	overflow-y: hidden;
	width: 900px;
	padding-top: 31px;
 
if there is no actuall text in the h1 tag then it wont count for anything, why is the hight 1px?

If you ARE putting text in there and it is not actually "visible" on the page google will not count it. (and possibly penalise if the rest of the site is coded on a similar vain)
 
There is no point putting an image in a H1 tag.

The best way to do this SEO/accessibility-wise is to put your image as the background of the H1, then make the text-indent of the H1 something ridiculously negative to remove the text - but still have it 'visible' to screen readers and spiders, eg. -9001px.

Failing that use Cufon and ditch the image.

*fixed - thanks gord.
 
Last edited:
If you ARE putting text in there and it is not actually "visible" on the page google will not count it. (and possibly penalise if the rest of the site is coded on a similar vain)

Are you sure? I have anchors inside my h1 tags. I have images inside my anchor element, the image has an alt tag.

I'd have thought Google is smart enough to work down through the attributes and pull the relevant data. Although, I should have title tags on my anchor to make sure.
 
There is no point putting an image in a H1 tag.

The best way to do this SEO/accessibility-wise is to put your image as the background of the H1, then make the margin-left of the H1 something ridiculously negative to remove the text - but still have it 'visible' to screen readers and spiders, eg. -9001px.

text-indent: -9999px;
 
Back
Top Bottom