You are here:

Alt Attribute & SEO

4.87 out of 5 based on 112 ratings. 23 user reviews.

Optimizing images is becoming more and more important in SEO (Search Engine Optimization) for websites. The ALT attribute is a critical step that is often overlooked. This can be a lost opportunity for better rankings.

In Google’s webmaster guidelines, they advise the use of alternative text for the images on your web site:

Images:. Use the alt attribute to provide descriptive text. In addition, we recommend using a human-readable caption and descriptive text around the image.

Why would they ask us to do that? The answer is simple, really; search engines have the same problem as blind users. They cannot see the images.

Many webmasters and inexperienced or unethical SEOs abuse the use of this attribute, trying to stuff it with keywords, hoping to achieve a certain keyword density, which is not as relevant for rankings now as it once was.

On the contrary, high keyword density can, on some search engines, trigger spam filters, which may result in a penalty for your site’s ranking. Even without such a penalty, your site’s rankings will not benefit from this tactic.

This method also puts persons who use screen readers at a greater disadvantage. Screen readers are software-based tools that actually read aloud the contents of what is displayed on the screen. In browsing the web, the alt attributes of images are read aloud as well.

Imagine listening to a paragraph of text which is followed by repetitions of many keywords. The page would be far from accessible, and, to put it bluntly, would be found quite annoying.

What exactly is an Alt attribute?

An ALT attribute should not be used as a description or a label for an image, though many people use it in that fashion. Though it might seem natural to assume that alternate text is a label or a description, it is not!

The words used within an image’s alt attribute should be its text equivalent and convey the same information or serve the same purpose that the image would.

The goal is to provide the same functional information that a visual user would see. The alt attribute text should function as a "stand in" in the event that the image itself is not available. Ask yourself this question: If you were to replace the image with the text, would most users receive the same basic information, and would it generate the same response?

Some examples:

  • If a search button is a magnifying glass or binoculars its alt text should be ’search’ or ’find’ not ’magnifying glass’ or ’binoculars’.
  • If an image is meant to convey the literal contents of the image, then a description is appropriate.
  • If it is meant to convey data, then that data is what is appropriate.
  • If it is meant to convey the use of a function, then the function itself is what should be used.

Some Alt Attribute Guidelines:

  • Always add alt attributes to images. Alt is mandatory for accessibility and for valid XHTML.
  • For images that play only a decorative role in the page, use an empty alt (i.e. alt="") or a CSS background image so that reading browsers do not bother users by uttering things like "spacer image".
  • Remember that it is the function of the image we are trying to convey. For instance; any button images should not include the word "button" in the alt text. They should emphasize the action performed by the button.
  • Alt text should be determined by context. The same image in a different context may need drastically different alt text.
  • Try to flow alt text with the rest of the text because that is how it will be read with adaptive technologies like screen readers. Someone listening to your page should hardly be aware that a graphic image is there.

Please keep in mind that using an alt attribute for each image is required to meet the minimum WAI requirements, which are used as the benchmark for accessibility laws in UK and the rest of Europe. They are also required to meet "Section 508" accessibility requirements in the US.

It is useful to categorize non-text content into three levels:

  • Eye-Candy
  • Mood-Setting
  • Content and Function

I. Eye-Candy

Eye-Candy are things that serve no purpose other than to make a site visually appealing/attractive and (in many cases) satisfy the marketing departments. There is no content value (though there may be value to a sighted user).

Never alt-ify eye-candy unless there is something there which will enhance the usability of the site for someone using a non-visual user agent. Use a null alt attribute or background images in CSS for eye-candy.

II. Mood-Setting

This is the middle layer of graphics which may serve to set the mood or set the stage as it were. These graphics are not direct content and may not be considered essential, but they are important in that they help frame what is going on.

Try to alt-ify the second group as makes sense and is relevant. There may be times when doing so may be annoying or detrimental to other users. Then try to avoid it.

For instance; Alt text that is identical to adjacent text is unnecessary, and an irritant to screen reader users. I recommend alt="" or background CSS images in such cases. But sometimes, it’s important to get this content in there for all users.

Most times it depends on context. The same image in a different context may need drastically different alt text. Obviously, content should always be fully available. The way you go in this case is a judgment call.

III. Content and Function

This is where the image is the actual content. Always alt-ify content and functional images. Title and long description attributes may also be in order.

The reason many authors can’t figure out why their alt text isn’t working is that they don’t know why the images are there. You need to figured out exactly what function an image serves. Think about what it is about the image that’s important to the page’s intended audience.

Every graphic has a reason for being on that page: because it either enhances the theme/ mood/ atmosphere or it is critical to what the page is trying to explain. Knowing what the image is for makes alt text easier to write. And practice writing them definitely helps.

A way to check the usefulness of alternative text is to imagine reading the page over the telephone to someone. What would you say when encountering a particular image to make the page understandable to the listener?

Besides the alt attribute you have a couple more tools at your disposal for images.

First, in degree of descriptiveness title is in between alt and longdesc. It adds useful information and can add flavor. The title attribute is optionally rendered by the user agent. Remember they are invisible and not shown as a "tooltip" when focus is received via the keyboard. (So much for device independence). So use the title attribute only for advisory information.

Second, the longdesc attribute points to the URL of a full description of an image. If the information contained in an image is important to the meaning of the page (i.e. some important content would be lost if the image was removed), a longer description than the "alt" attribute can reasonably display should be used. It can provide for rich, expressive documentation of a visual image.

It should be used when alt and title are insufficient to embody the visual qualities of an image. As Clark [1] states, "A longdesc is a long description of an image...The aim is to use any length of description necessary to impart the details of the graphic.

It would not be remiss to hope that a long description conjures an image - the image - in the mind’s eye, an analogy that holds true even for the totally blind."

Although the alt attribute is mandatory for web accessibility and for valid (X)HTML, not all images need alternative text, long descriptions, or titles.

In many cases, you are better off just going with your gut instinct -- if it’s not necessary to include it, and if you don’t have a strong urge to do it, don’t add that longdesc.

However, if it’s necessary for the whole page to work, then you have to add the alt text (or title or longdesc).

What’s necessary and what’s not depends a lot on the function of your image and its context on the page.

The same image may require alt text (or title or longdesc) in one spot, but not in another. If an image provides absolutely no content or functional information alt="" or background CSS images may be appropriate to use. But if the image provides content or adds functional information an alt would be required and maybe even a long description would be in order. In many cases this type of thing is a judgement call.

Image Search Engine Optimization Tips

Listed below are key steps in optimizing images:

  • Choose a logical file name that reinforces the keywords. You can use hyphens in the file name to isolate the keyword, but avoid to exceeding two hyphens. Avoid using underscores as a word separator, like for example "brilliant-diamonds.jpg";
  • Label the file extension. For example, if the image search engine sees a ".jpg" (JPEG) file extension, it’s going to assume that the file is a photo, and if it sees a ".gif" (GIF) file extension, it’s going to assume that it is a graphic;
  • Make sure that the text nearby the image that is relevant to that image.

Again, do not lose a great opportunity to help your site with your images in search engines. Use these steps to rank better on all the engines and drive more traffic to your site TODAY.


Google Image Search Help:

Related References:


About this SEO tutorial

This tutorial was written by , Forensic & Social Semantic Web Consultant at SEO Workers and was published September 10, 2007.

Copyright reserved. Not to be reproduced.

Comments & Ratings

Alt Attribute & Image Search Engine Optimization Anthony 5 stars 2012-02-17 20:10:11 Agree with you 100% on labeling the image itself and not trying to stuff your txt with keywords. Man, I would have never thought of using the folder name to use a great chance on plugging in some great seo valued keywords that will help it in terms of rank value etc.It seems that there are thousands upon thousands of factors that go into SEO but when you really study the main core elements there are only a handful of things that you have to pay attention to.Thank u for the tips. Going to update my pages this week and would like to report back

Alt Attribute & Image Search Engine Optimization ashvindx 5 stars 2012-02-15 01:55:04 What about TITLE tags in images? Many SEO articles these days say it's required as much as the ALT tag. What do you think? (I think it'll make a nice blogging topic)

Alt Attribute & Image Search Engine Optimization Teo Graca 5 stars 2012-01-04 09:47:37 I noticed there were no comments about the 508 complacency issue. All US government agencies are required to use this standard. It is used by website readers for the blind, or in my case, website readers for people that like to be read to. The website readers use the ALT attribute to describe the picture to the listener. If you get time, you might want to get one of these readers and try it yourself. It's great having articles read to you while you work on other things!

More comments

Alt Attribute & Image Search Engine Optimization Robert Scott Lawrence 5 stars 2011-12-15 20:10:33 I had an SEO analysis done of my site today and the chief issue for which I got dinged was not having any alt tags on my photos. I always thought putting alt tags on them was unnecessary and -- frankly -- kind of spammy if used for SEO purposes, so it's nice to see someone who feels the same way.

BTW, virtually every other SEO optimization post I've seen encourages the use of alt tags on all images. Is this another case of ninja vs. samurai?

Alt Attribute & Image Search Engine Optimization Rita 5 stars 2011-11-28 20:33:23 Your tutorial has helped me how to write my alt descriptions. I usually just described what the picture was not the function/reason of the picture. I especially liked learning about how the screen readers utilize the alt. Thanks for providing such a great learning aid for my web designs classes that I am taking.

Alt Attribute & Image Search Engine Optimization Danny Watson 5 stars 2011-10-17 03:14:03 You can't find such info around.
You helped me overwhelm some concepts that I had for alt tags.

Alt Attribute & Image Search Engine Optimization aivil vin 4 stars 2011-09-24 11:57:59 I am using Blogger's blog and you know that it, by default, doesn't create any Alt tags. Sometime back i got to know this crucial fact about Alt tag, then i reworked on all the images and added Alt tags by myself.To my surprise the no. of daily page views started increasing and i saw the some visitors were coming from Google image searching.

Alt Attribute & Image Search Engine Optimization Eric 5 stars 2011-08-21 15:32:55 I think as long as you don't get too carried away with trying to stuff keywords in alt tags, it can be a useful part of SEO. Not only does it help the handicapped.(As listed above) But it also can help google find more relevant images for its other search functions such as google images. More and more I see google incorporate images into its main search results so the image name and alt tags come in handy.

Alt Attribute & Image Search Engine Optimization SMS 5 stars 2010-09-20 11:24:56 Your post states:

Avoid using underscores as a word separator, like for example "brilliant-diamonds.jpg";

It seems you are giving a different example for what you are intending.

Do you mean avoid underscores like alt_tags.jpg or avoid hyphens like alt-tags.jpg?

Also, is there a limit to the length of the ALT attribute? If I needed a 500 character alt attribute, can I just use it or does it have to go to the long description at that point?

Alt Attribute & Image Search Engine Optimization John S. Britsios 5 stars 2010-09-05 05:29:23 @Clay Boggess simply show them this article. In addition you can show them the video of Matt Cutts, Head of Googles Web Spam Team

Alt Attribute & Image Search Engine Optimization Clay Boggess 5 stars 2010-08-25 08:09:35 Thank you for the information. I am trying to convince our companies web developer to incorporate ALT tags into our site. He says that they have little SEO value and are really only useful with visually-impaired users. How can I convince him?

Alt Attribute & Image Search Engine Optimization fence nashville 5 stars 2010-08-17 20:58:49 Thanks for the info, We are working on getting all our fence images in the way they are suppose to be! Thanks again!

Alt Attribute & Image Search Engine Optimization GuitarBoy 4 stars 2010-08-07 21:15:19 Thank you for this informative post indeed. I was really in need for this. But still in confusion regarding this. If we simply rename an image with extension relevant to what the image is gonna describe, is that what we can say ALT text? Can you please clarify a bit?

Alt Attribute & Image Search Engine Optimization John S. Britsios 5 stars 2010-07-16 09:19:46 @Gopi Krishan Garhwal, underscores can not harm in image search engine optimization.

Alt Attribute & Image Search Engine Optimization Pamela 5 stars 2010-07-15 17:10:12 Much appreciated for the interesting article, John. I will try this out right now. Furthermore I will also rename the pictures.

Alt Attribute & Image Search Engine Optimization Gopi Krishan Garhwal 5 stars 2010-07-10 02:09:44 Please tell me how a undersocre will harm for an image optimization .I want to know alittle more while I have read hole article but the seaction in which you provide a conclusion of article is niche and yes i would like to sprad this article in my network.

Alt Attribute & Image Search Engine Optimization John S. Britsios 5 stars 2010-06-29 22:51:57 @yourlan, for the alt attribute I recommend using maximum 64 characters including spaces.

Alt Attribute & Image Search Engine Optimization yourlan 5 stars 2010-06-29 20:23:24 But i have a problem:
what is the maximum character count for the alt attribute?
Thanks if u would like answer me.

Alt Attribute & Image Search Engine Optimization M.-J. Taylor 5 stars 2010-06-02 11:17:22 As usual, John, you have nailed the topic. It's thorough and accurate. I liked it enough to make it today's SEO Tip of the Day on VZN:

I'm also impressed with your use of the "Reactions" section and the opportunity to review the article. I'm looking for these Reviews to show up as a rich snippet! I have to give you five stars!

Alt Attribute & Image Search Engine Optimization Whitney Segura 5 stars 2010-06-02 11:03:23 Excellent example and case study of everything one would ever need to know about alt attributes and SEO, as of the current algorithum. Sadly, the majority of webmasters do not ever attempt to implement the tips and best practices, listed above. But, I am very pleased to see that there still are pro's, like yourselves, giving out lessons from their own secret playlists.

Alt Attribute & Image Search Engine Optimization Angela Beasley 5 stars 2010-04-29 16:55:01 Thanks Ron. I get it. And yes, this is a great article. Thanks again.

Alt Attribute & Image Search Engine Optimization Ron Boyd 4 stars 2010-04-29 10:54:02 Great article John! Really love the detail you put in on using 'alt' so many designers and developers get this one wrong. I could only add that we have to remember to use title to provide info to the visitor, alt is to describe the image if you can't see it.

@Angela - John was meaning to avoid more than two (2) hyphens in the page url... eg. /this-would-be-too-many-hyphens/ So we would shorten it to: /too-many-hyphens/ (ok maybe not the best choice of a page title lol. but you get the idea, I hope) Hope that helps! Again, excellent article!

Alt Attribute & Image Search Engine Optimization Angela Beasley 5 stars 2010-04-28 09:04:57 When you say, "You can use hyphens in the file name to isolate the keyword, but avoid to exceeding two hyphens", are you referring to (2) consecutive hyphens or two hyphens throughout the entirety of the alt tag description? Thanks

Collapse comments

Attention Comment Spammers!

  • Google says that spamming other sites can lower your site rankings;
  • Signature links under comments are not accepted;
  • Highly relevant links in the body such as the web site or blog URL are allowed, but only upon our approval;
  • You can expect that your comment may be deleted if you are attempting to get a backlink link rather than adding real value to the conversation;
  • SEO or Link Builders, if we catch you commenting but linking to a client's site, your online reputation, your firm's and that of your client are being put at severe risk;
  • Link to a page or a blog that can be identified as being about you, so our readers can gain additional perspective on your point of view and where necessary sufficient disclosure.
Comment & Rate