Saturday, September 04, 2010

Image Replacement, text-indent, and SEO

When replacing text with an image, one famous technique - the Phark method - uses text-indent: -9999px to move the text off the screen so that it doesn't conflict with the image.

The problem with this is that Google doesn't like it. In this Google I/O session video from 2009, at 0:35:46 it says: "text-indent: -999" discouraged as image replacement technique due to risk factor of appearing spammy). A little later the Google presenter also says "text-indent: risky".

Then there's this Q&A starting at 0:40:00, where she says:

"Display: none", "visibility: hidden" - not something we are looking to penalize. ... I think text-indent to us is just usually so flagrant. I mean, you might be doing it for a good reason, so if you're doing text-indent -999 we're not saying, like take a whip to all those sites, they're going down! It doesn't happen like that. We actually evaluate all of them, but that just becomes a signal that you're gonna be flagged. We consider that fairly risky. So it's not a determinant of being penalized, but it's just something we want to discourage.

I don't know about you, but after that I'm thinking twice about any use of text-indent -999. It seems they associate it with sites that have used this heavily for "keyword stuffing". Those sites put many keywords on the page, but hide them from the user with a negative text-indent, or other technique such as white text on a white background. So using a negative text-indent automatically raises a flag with Google, and could hurt your search rankings.

On the other hand, Google knows that there are some legitimate reasons to hide text, such as image replacement, or Ajax controls such as accordions and tabs that only show a portion of the text. Using visibility: hidden or display: none seem safer than using text-indent. I suspect that text-indent is seen as a "sneaky" way to hide text, whereas display: none and visibility: hidden are very clearly specifying that the text should not be shown (so they are less "sneaky" and therefore not "spammy").

2 comments:

James said...

I don't think one is any less potentially spammy than the other, unless you're suggesting that spammers have something intrinsic about them which causes them to prefer text indent to display:none etc. Let's face it, spammers research hidden text techniques just as thoroughly as legit web designers and so they know exactly the same tricks as everyone else. And Google must know that modern web aesthetics necessitate the use of image replacement in logos and headings. So the problem of whether image replacement is honest or spammy is probably something they're working on all the time. I just wish they'd come up with an efficient way to recognize text in images when they crawl the web.

CSSBakery said...

James, Thanks for your comment. I agree that the spammers must be aware of all this too and are probably working on "new and improved" ways to boost their keyword density without getting flagged by Google. My guess is that at one time they probably got better results using text-indent -9999 rather than display: none because the search engines were setup to ignore display: none but not text-indent. I'm sure Google takes a lot of factors into consideration before deciding that a site is spammy, so a few text-indents are probably ok. Still, I think I'll stick to display: none/visibility: hidden whenever I have a choice.

Post a Comment