A Comment on SEO & CSS Image Replacement Techniques

Recently in the offices of my current employer there has been a friendly debate around some of the specific things we do as developers and how they may be impacting SEO and search engine rankings.

For some background info, here is an email that was sent out by Project Management that, with approval, would have become a best practice:

All,
We learned something new today about H1 tags relating to SEO that we felt was worth sharing company wide. I’ll try to keep it short…

Currently, it is common practice to place H1 text behind the logo image on every page (cloaking). The actual main heading on the page in this case, would be an H2 tag.

Up to this point, I think that most of us thought that this was okay as long as you were not stuffing the H1 tags with keywords, but instead using the company name.

After much research, [Project Manager #2], [Project Manager #3], and I found that this practice is becoming less desirable by both Google and Yahoo.

You can watch Matt Cutts take on the situation here: http://www.youtube.com/watch?v=fBLvn_WkDJ4

This is what Google has to say about it: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=66353

From now on, please avoid cloaking. Instead, use the alt tags and please follow this best practices for images: http://www.google.com/support/webmasters/bin/answer.py?answer=114016

I believe that email was primarily prompted from the video posted by Matt Cutts (head of the Google Webspam team) on YouTube with his answer to the question “If you have a company logo on your site, what is the best way to include the text of the logo for SEO purposes? ALT tag, CSS hiding, or does it matter?” Yes, this video was posted 8 months ago, but new people are always discovering it. His answer, and the other links cited above, give the impression that using any sort of CSS image replacement technique, for headers or otherwise is going to have a negative impact on a site’s rankings and may even get Google to ban it.

Now, this would have major changes to some of my best coding practices that I use on every project, the same ones I’ve passed on to other developers as senior developer in the Creative department, and so when asked for my input on the subject I felt the need to set a few things straight. It may be a bit “inside baseball” but below is my full response (cleaned up and edited just a little for the blog):

Here’s my take on the situation, and granted I am no Matt Cutts of Google, who’s word is treated as the gospel by all SEO-inclined web devs out there.

Where we use this technique primarily is in a page header for the logo. From an SEO perspective this is the going to be the first bit of information a search engine sees and should be treated as one of the most important parts of the page. It tells you where you are at, what site you are on, maybe what that site is primarily about. From a web development standpoint this is going to be one of first (in code order) pieces of non-structural semantic content. From a user’s perspective (normal, screen reader, mobile or otherwise) this is going to be the first thing they see.

That’s why we use an h1 tag. It gives a semantic meaning to the text it contains (vs. using span or div or nothing at all) and says to search engines, screen readers, limited mobile browsers, and normal users (when left in a default style) that this info is !important.

Now typically a logo is simply a fancy type treatment on some words, and it may or may not be combined with some sort of brand mark. I believe putting this text (Company Name, Brand, whatever) into the h1 has more meaning to a wider variety of users and devices than simply alt text on an image file. Again, an h1 has more semantic meaning to the content of the page. Also, screen readers can be set to skip alt text and in those few cases do we really want accessibility issues of users not hearing the name of the site they are on?

I’m not saying that including a logo with proper alt text is a bad technique. As Matt Cutts says in the video it is the easiest way to do it; but I don’t think that it has the same benefits as what we currently do in this instance. Now simple text can’t always recreate what would better be served by an image or photo, and of course proper alt text should be used in those cases to give search engines/users the gist of the meaning of an image.

Now to dispute the idea that the techniques we are using are somehow “bad.”
Nowhere in this video does he say that Google disapproves of what we are doing specifically or that these sites will be penalized for doing so. He is simply pointing out that alt text on an image should be used and he stands by it being the better technique in this one case.

So, my argument:
As I said we’ll presuppose that the when we are using this technique it is primarily for a proper company name or headline. At the most basic level this Name is simple text, readable by any machine or human, so that is the data we start with when writing the HTML. But on a website, in this position on the page, clients/users/people expect and want to see it in its more stylized format (the logo).

Example: Joel Sunman Co., LLC. vs. This is a terrible logo

I’ve been trained and learned that there should be a clear separation between a web page’s content (HTML: titles, words, links, photos, dates, numbers, etc.), the way it is designed and presented (which should be controlled by CSS) and the way it behaves (functionality and interaction increasingly driven by JavaScript).

Again, supposing that this logo can be boiled down to simple text I see our technique as more of a progressive enrichment of style to the page. This is a term that is used more and more for web pages where developers add enhancements to a page that may improve aesthetic or functionality, but which do not hinder those who can’t view the technique. We do this all the time with CSS, Flash and JavaScript.

For example the new CSS3 specification allows for style enhancements such as drop shadows, rounded corners, text shadows, things that make the site look a little prettier, without having to cut out (and have the user download) a dozen more images, or would otherwise simply be impossible. Now a user looking at the site on an older or incompatible browser may not see that text box as pretty as someone else because it’s not rounded with a drop shadow behind it, but they still get the information.

With Flash it is the same thing, we give you an Flash-y banner maybe with some interactive buttons for more info, but if you don’t have Flash we’re going to give you a static image with active links. Or maybe it’s a drop down menu we’re talking about. A little CSS and the menu hides when your mouse leaves the navigation, and pops up when you rollover. If you are on an older browser maybe you need a little JavaScript to nudge you along. If you can’t even handle that, no problem: here’s a basic unordered list with anchor links.

All this is to say that the technique we are using is a simple bit of progressive enhancement. Everyone gets the important text, and if you can handle it (even though that may be 99.7% of everyone nowadays) you get a pretty picture in its place, and bonus: the important text is still there!

Nowhere do we get into the spammy techniques that Google is warning against using here:
http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=66353

There is no hiding for the purpose of deception. We’re not giving Google keywords and normal users something different. This isn’t nefarious CSS trickery anymore than serving an IE6 specific stylesheet to fix that browsers bugs is. This is a VERY, very common technique. Disable stylesheets on your browser and surf around. Unscientifically, I bet I can find just as many big sites that the same technique we do for their logo (Best Buy, Yahoo!, Digg, Facebook) as use just a plain image with alt text (Google, Microsoft). That is enough evidence to me that this is not going to get anyone banned from Google or have a negative impact on rankings, and it’s my belief that doing as we have actually increases SEO relevancy for the company name and has been used time and time again to sell our successful “SEO-ing” of a site.

I’m all for looking at new evidence or techniques when they come up, but it would be a mistake to read these few articles and take it to mean that we should completely abandon what we’ve been doing for years with success.

Thanks,
[Joel]

FugScreens Studios Launches

Zissou at FugScreens approached me to help with the launch of a new site for his studio, one that was separate from his own personal portfolio website. He had a few ideas about the look but wanted to stress simplicity. This is the design I came up using their logo for inspiration and incorporating his hand drawn graphic ink splatters.

The entire site was built on WordPress allowing him and interns the ability to update everything without much knowledge of code. The most important aspect was selecting a solid gallery plugin that would allow for an unlimited number of galleries, and an unlimited number of images in each. They can be used to showcase student artwork, or his own pieces for sale.

Screenprinting studio site includes:

  • Design and Development
  • Custom WordPress Theme
  • PayPal Integration for Simple Shopping Cart

View Live Site

Simple, Gray, pretty much Awesome

That was the extent of Megan’s website requirements laid out in her design brief* when we started the project.

Using her own custom business card as inspiration we came up with a clean and open layout that wouldn’t distract from her artwork, as well as featuring her custom designs for sale on Etsy. All data for the galleries is maintained in XML allowing her to update on her own quickly, and since the store imports its data directly from Etsy any changes made on that site will instantly be reflected here.

As the galleries were all displayed using Flash and SimpleViewer, I created a custom mobile site that would allow quick access to all her contact info, designs, artwork and store without the use of any plug-ins. Useful for when she’s out schmoozing and networking around town. Dynamic PHP and CSS means no second set of data has to be maintained just for this mobile site and version control issues are eliminated.

Portfolio site includes:

  • Custom Design
  • Etsy API Integration
  • SimpleViewer Customization
  • Mobile Versions for Android, iPhone and Blackberry

View Live Site

* By design brief I really just mean the conversation about her future website over sushi :)

IMU Collection Launches

I’m pleased to show off my latest development project, the site for t-shirt brand I Miss You, Inc.

The programming process has been an intense month of work but the results are worth it. The open source content management system Drupal runs the backend with the addition of the Ubercart module running the storefront.

There have been challenges at every turn, primarily bending Drupal and it’s multitude of modules to my will. The design provided by the great and talented Andrew Smith is different than anything we’ve ever worked on together, so every little piece of the site required customization. Not sure what it was about the CSS on this site in particular but I ran into more ridiculous IE7 bugs than I ever have before.

T-shirt storefront includes:

  • Full Drupal Customization
  • E-commerce Storefront
  • Blog and Community Forums
  • Mailing List

View Live Site

One other piece of the project was streaming the launch party live on ustream.tv. Andrew handled the camera duties and I monitored Firefox to make sure it didn’t crash. I can’t say enough good things about ustream. A very easy setup process and straightforward tools helped everything go off smoothly, even though we were cutting it close and had little time for a dry run. The built-in chat was great for getting feedback and joking with the viewers (someone even from Brazil). I’ll definitely be using it for events in the future.

AdTec Launches

Consulting firm site includes:

View Live Site

There was a time back in the day when Andrew would hand over a design like this ready to build when I would just scowl at him. “Drop shadows over a subtle gradient background? Again?” In the age of Internet Explorer 6 getting a design like this pixel perfect was a harrowing experience at best. Luckily we’ve come a long way. When Andrew does the same thing now and wonders if it’ll be a problem I can just laugh and knock out a full build in a matter of hours. The tools, tricks, and numerous times of running into the brick wall of browser bugs I’ve gathered over seven years has taught me a thing or two.