Google Webmaster Central Blog - Official news on crawling and indexing sites for the Google index

Using ALT attributes smartly

Thursday, December 06, 2007 at 11:03 AM



Here's the second of our video blog posts. Matt Cutts, the head of Google's webspam team, provides some useful tips on how to optimize the images you include on your site, and how simply providing useful, accurate information in your ALT attributes can make your photos and pictures more discoverable on the web. Ms Emmy Cutts also makes an appearance.



Like videos? Hate them? Have a great idea we should cover? Let us know what you think in our Webmaster Help Group.

Update: Some of you have asked about the difference between the "alt" and "title" attributes. According to the W3C recommendations, the "alt" attribute specifies an alternate text for user agents that cannot display images, forms or applets. The "title" attribute is a bit different: it "offers advisory information about the element for which it is set." As the Googlebot does not see the images directly, we generally concentrate on the information provided in the "alt" attribute. Feel free to supplement the "alt" attribute with "title" and other attributes if they provide value to your users!
The comments you read here belong only to the person who posted them. We do, however, reserve the right to remove off-topic comments.

41 comments:

Philipp Lenssen said...

I know Google isn't too much into the W3C stuff, but as this is a tutorial you might as well teach newcomers the right names... which are "image tag" or "image element" and "alt attribute" or "alt text". "Alt tag" is wrong and can be confusing as soon as people want to move on to better understand the W3C specifications and tutorials.

And while we're talking standards and accessibility, you might also wanna clarify the difference between an alt attribute and the title attribute for images.

LEGIT freebies dude! said...

Very nice info. Thanks a lot Matt!!!

JLH said...

Philipp is very smart. Thanks for the video and information Googlers.

http://search-engines-web.com/ said...

Sometimes one feels the need to keyword stuff the ALT tags to take advantage of misspellings or synonyms - that once searched for - would be the only reason that one's site had a chance to be on the SERPs for those terms.

Some SEOs feel compelled to use ALT tags as Meta Keywords, on some pages

Numedia said...

I use the "TITLE" tag more often, sometimes using only TITLE and not ALT.
Does Google ignore the TITLE tag? What would you reccommend?

Thanks
Doi lei

recover said...

I agree with philipp, Google should use the proper names when doing stuff like this.
There are some good info in this video, but making the info more correct sure make the video better. :)
Keep this up, you should make this a weekly/monthly series. :D

Corey said...

I agree with Phillip. The beginning of the video even has <alt> as if an alt tag really does exist. Odd.

SearchEnginesWeb, talking about "keyword stuff[ing]" and trying to "take advantage" will never win you sympathy from the Goo.

Cafercan said...

Hi
Thanks Matt Good watching.
i would like to ask you is there is a GG tecnology for dedect dublicate photos. i mean if someone steals someone's photo and push it to own site, GG could understand this is dublicate image.shortly do you use image processing.?
thank you.

bpayne said...

But even if you keyword stuff like crazy. Google won't do anything about it. What? That's right, nothing.

Here is an example. The logo is the best part of it all though.

I've already turned them into Google via their spam form, to Google via Webmaster Central form, even to live human-being Googlers at SES San Jose 2007, etc. etc. etc.

NOTHING.

So stuff away . . . ;-)

Hasan said...

Somebody I know pointed this out as a way of improving Google's services. Indeed, he even offered to write the code for them. This was during his interview and he got rejected, but I guess it goes to show that the interviewers do pay attention to what interviewees say.

Kevin said...

The Webmaster videos do contain some helpful, if somewhat basic content. I can't say much for the quality (video, audio, and production values) though. For example: http://www.apple.com/business/videotips/

John Mueller said...

Hey Philipp, you're right about the "alt" attribute :-), we caught it in time for the blog post though.

search-engine-web, keyword-stuffing goes against our Webmaster Guidelines, especially when it is done in a way that is not visible to the user. "Filling pages with keywords results in a negative user experience, and can harm your site's ranking."

bpayne, keep in mind that just because a site uses keyword stuffing (or any other method that goes against our Webmaster Guidelines) does not mean that they are profiting from it. That said, if you feel that a site is going against our Webmaster Guidelines, please take the time to file a spam report in your webmaster tools account.

sernakplywood said...

Very nice info. Thanks a lot

Chuck Reynolds said...

It still bothers me to hear "ALT Tags"; they're "ALT Attributes" not tags. It goes inside the img tag and therefore makes it an attribute of the img tag.
It's a good basic introduction but it doesn't help to have people learn the wrong thing from such a big name.
Attribute, not tag.

bpayne said...

I have, on more than one occassion and even talked to a Googler about it at SES San Jose. It would be nice to know if any action has been taken because . . . it seems they are getting away with it.

It's frustrating to see abuses, report abuses, and not see anything happen about it.

A Real Person! said...

Thanks - This is very useful, and now I know that Google is looking out for ALT attributes (not tags as philipp lenssen said) in images on the net I'll be including more of them in my images. I usually do, but I will do more so now!

Thanks.

ChaosKaizer said...

yes philipp is smart. Just for your information, certain browser (the populars one's) doesn't render "title" attributes and they were part of w3c. I don't think understanding and specs has much weight today's.

Back to the topics. This is a good informations for beginner learning HTML. ALT is a "alternative" replacement for broken image and text base browser (i.e: lynx, W3m, Elink). There is second unpopular attributes that provide similar (and confusing) function as ALT . LONGDESC (WCAG AAA).

Goverment agency (in US & UK) has to comply with 'section 508' and most webmaster support ALT for the sake of validation and accessibility (WCAG). so ALT is important. And a small percentages of webmaster used it for "spamming keywords".

Because the scope is about IMAGE and Label (tags), I think my question is quite relevant.


1. Is there alternative way to tag CSS or base64-uri image?
2. Does google read IPTC/EXIF embed image tags?
3. Does google penalize 1 x 1 px image?.
4. Is "display:none" on image count?

Thank you.

Dave said...

bpayne .. you don't mention what you are measuring in determining that Google has done nothing. Toolbar PR? Position in SERPs for stuffed keywords? I don't Google needs to report to anyone on either of these things, since we can view them (though toolbar PR changes are a long wait most times).

What kind of response do you think Google is supposed to provide? If they say "We did something about it," or "We were already doing something about it," is that all you need? If they're too busy to get to it yet, should they take the time to let you know?

You realize they aren't going to tell you what the result of is, right? (They're not going to expose their process just because someone asks.)

Dave said...

ChaosKaizer, most common approach to "tagging CSS" is to use text image replacement. Overview of some methods:

http://www.mezzoblue.com/tests/revised-image-replacement/

Alternatively, use the title attribute in some cases, don’t use a CSS background image. Use HTML instead and code the correct ALT attribute text.

(Less recommended would be to use a transparent or empty image map and attach ALT text to the map)

---------------------

If there is alt text or a link (web bug) on a 1x1 image, clearly this an attempt to hide information from the user while showing it to the search engine bot. There are some non-spam legitimate reasons for doing this, but all have alternatives that would not be seen as black-hattish.

---------------------

Google does use EXIF data in Picasa web albums.

---------------------

Display:none can be abused as well. In short, it's not always what you do, it's why you do it. But if there is a more visible to visitors way to do things, do it. Say you want to adjust link flow to influence page rank within a site by adding links to pages. Don't use 1x1 images. Use text links or hyperlinked images visible to visitors.

Dave said...

Note that Google allows some cases of hiding text with CSS:

http://www.seroundtable.com/archives/013790.html

Google's info for webmasters on Hidden text and links:
http://www.google.com/support/webmasters/bin/answer.py?answer=66353

Michael Martinez said...

Google could help a lot of Webmasters by NOT allowing hotlinkers to influence search results. I have had to take two popular domains out of Google image search because you reward images that have inbound links (hotlinks, where people steal bandwidth by embedding pictures from other sites in their own content).

Eric said...

What types of javascript does the Googlebot render? On my site, the pagesource has some javascript like: text/JavaScript'> InstructJS.load(['imagespot'], function (..., which the browser renders into the img tag. If I add alt text to that rendered tag, will Googlebot be able to find that text and connect it to my images?

Thanks for your help!

nasskobar said...

A lot of times I have been used to using ALT and TITLE both in the image tag.

The reason is so as to let the alternative text (or alt tag) be seen in both the browsers which we use often which is the Internet Explorer and Mozilla FireFox.

Hope its okay to have both of them in there, right?

Victor said...

I don't like the look of google's main page
:@

Neeraj Srivastava said...

That's really nice presentation and helps a lot and easy to understand too.

thanks a lot.

Admin said...

Philipp, don't be so picky. Just be happy that Google is giving us videos :).

Aaron said...

Philipp is a little geeky intense sometimes. :)

I learned the value of ALT when a handicapped man yelled at me via email. I took the opportunity to run a few ideas off him and found that he was also annoyed with my website grammar. Do not forget about people who travel the internet in non standard ways! They rely on ALT, TITLE and well written content. :)

piero said...

And what about the same image in different versions of the same page in different languages?
The ALT content has to be the same (no risk of duplicated content?) or it can be different for each language, without the engine been confused?

Thogek said...

But Philipp's right. ALT is an attribute, not a tag, and mixing the terms is not helping people's understanding of what they each mean.

For example, what if someone asked you about your TITLE tag? What would that mean to you, offhand? (No, no, the TITLE tags on your images!)

ted said...

New topic. - I just completely redesigned a website for a client. How do I get rid of all the old links in Google and force a new bot crawl?

Susan Moskwa said...

Hi Ted,
Your question would be much more appropriate in our Help Forum than here.

SuniL said...

i have a blog and it is not visible on either blogspot and google i do submitted my ulr plzzzz help here is the link-
http://northeasttoday.blogspot.com/

Thanks.

Greg said...

Thanks for the great post.

Apparently ALT attribute text is also used to populate the eight most popular sublinks on the SERP, the ones that appear for high-traffic sites. In an effort to change the text in those sublinks, I modified the referring ALT attributes accordingly but the bot isn't picking up the changes (the sublinks continue to use the old ALT attribute text).

Do you know of any way to forecefully refresh/recrawl/update those sublink items to reflect the current ALT values? I'm using a sitemap and pinging/resubmitting doesn't seem to help.

Thanks for your help. Great blog.

Erica said...

I ahve also noticed that Firefox does not rad the ALT attribute of images, but it will read the images if you have the title attribute in there. This is also good for accessibility. BUT, do you want to have the same text in both on the same image? Or would you get penalized for repetitive text?

Phoenix Arizona Auto, Car, Home Owner Insurance Quote said...

The site shown below was ranked on the first page of Google for some good search terms. I updated it with lots of content and it fell off the map, and still is way down on every term I want and need. I really have no clue why adding content made it a worse site in Google's eyes.

http://www.grandcanyonquotes.com

Fun said...

What about comments with accent marks. For example: "Quê Hương Tôi"

If someone try to search for "Que Huong Toi" instead of "Quê Hương Tôi", does google image search give the same result?
If not, what do you recommend for the ALT tag, should we use "Quê Hương Tôi" or "Que Huong Toi" for both separated by a comma?

Susan Moskwa said...

Hi Fun:
Check out the blog post we did on how accented characters are treated in search results.

podarok said...

Not only alt but title, desc, longdesc, rel elements can help google indexing images.

Chris said...

Does Google index images that are dynamically generated? Most of my images come from a database and have img tags like:

img src="/utils/image.aspx?idaccomm=292&imageindex=
&compresspct=0&fieldname=image" alt= "This is my alt text" class="photo" width="175"

where there is no obvious .jpg .gif etc in the URL. I can't find any of my images indexed in Google Images and was wondering if this was part of the reason.

Kessa said...

I Found this video really intersting as I recently attended an accessibility conference and the people presenting it said NOT to use the alt attribute like this (yep - I was just as confused :-) )

Their rationale was that if the image doesn't convey information then the alt attribute should be blank (i.e. alt="")

So to help demonstrate this, here are 2 examples of when they say an image should / should not be used:

1) When an image contains information:

"Buy our widgets and save 20%"

- if you don't provide an alt attribute the user is missing out on key information.... so this would be a valid use of the alt attribute.

2) When the picture contains no information.

A profile pic is an example of this (and as luck would have it - this page also includes a good example of this very case :-) )

Take a look at the top of the page and you've got some profile pics - hover over those and it writes out the username of the person who posted it.

Now. What value does that add for the end user? None, as we already know what the username is from the post.

So in this instance, you should use the alt="" (at least - that's what the accessibility guys say)

In a similar vain, if you can't avoid creating a "click here" link, then use the title attribute to add information about the link.

However, if you carefully word your link you could have something like "Download our latest brochure here" then there is no need for a title attribute (and in fact, not having one then makes the site more accessible as if you include one then the screenreader will read out: "Download our latest brochure here, Download our latest brochure here"

Kessa said...

Matt - do you have any comments on this which could add clarification?

It seems that many sites which duplicate content (or use unnecessary content in the alt="" / title="" attributes) rank really well in Google.

I've seen one example (I won't name them here, but contact me if you want to see an example) which is a great example of this.

On the site they list holiday homes. When you do a search it brings up regions. For each region there is an option to narrow down the result by the number of bedrooms.

Fair enough so far.

However, each of the links is an image (1 bedroom, 2 bedrooms, 3 bedroooms, etc)

Now. My first issue is....why use images at all for this in the first place
- I don't see why text links (as a list, as it is a list of options afterall,) wouldn't work just as well if not better for disabled users as screenreader users would know right away how many options were on the page.

However, they've also taken it a step further.

For each image, rather than simply adding the info for that image (i.e. alt="1 bedroom") they have "optimised" it by using unnecessary additional content / keywords:

"1 bedroom villas and apartments in region

"2 bedroom villas and apartments in region

"3 bedroom villas and apartments in region

"4 bedroom villas and apartments in region

Now in my eyes - this is (borderline) spam as it's added unnecesary content...

....but in Google's eye's it seems to be fine as they rank really really well - position 1 in fact for some search terms (and good on them in fairness)

But it does send mix messages that using alt="" / title="" attributes incorrectly is actually OK with Google.

Do you have any thoughts on this?