ALT vs. TITLE Attributes For Images in HTML

The alt and title attributes, when used with images, are often the source of many questions because they seem redundant. But even more important, many wonder how the use of these attributes affect visitors and search engines?

The Alt Attribute

Description: Text contained within the alt attribute is used to specify alternative information that should be shown if an image is inaccessible.

So this text is typically shown to visitors if an image is missing, or cannot be downloaded to to a sluggish web server or slow internet connection. It is also shown to people who have disabled images in their browsers. If you have not specified alt text, a missing image is displayed as a blank box or an empty icon depending on browser. Additionally, alt text is typically shown when users hover over an image when using Internet Explorer.

Also, perhaps more important, Google acknowledged that Googlebot uses alt text to determine what an image is about:

As the Googlebot does not see the images directly, we generally concentrate on the information provided in the "alt" attribute.

So for search engine optimization, using the alt attribute is very important.

And finally, according to W3C (the World Wide Web Consortium) the use of alt attributes with images is required for valid HTML.

The Title Attribute

Description: Text contained within the title attribute is used to display additional information.

The title attribute is primarily important for users. For example, when you hover over an image with title text, the data contained within the title attribute pops up. And with Internet Explorer (IE), which has been known to favor alt text, the title text now takes precedence in IE versions 7+.

But with regard to search engine optimization, it is unclear as to how search engines use title text.

Summary

  • Always specify alt text. It’s good for search engines and visitors when images cannot be displayed.
  • Title is optional. But it is a good idea to use it to specify the additional information that pops up when users hover over an image.
Tags: , ,

15 Responses to “ALT vs. TITLE Attributes For Images in HTML”

  • On January 17th, 2009 at 11:30 am, stratosg wrote:

    nice sum up of the two thingies. i remember a smalltalk a few days back on twitter on this. next time i’ll have a link to point out ;)
    stratosg’s last blog post..FunnyInbox: How about a nice laugh?

  • On January 17th, 2009 at 11:40 am, Jen wrote:

    I have been paying more attention to images recently and have noticed on most peoples sites and blog that they name the image after the title or main keywords in the post.

    Your explaination made me understand why it is important to do that and how it helps in searches. Thanks!

    Jen’s last blog post..Your Network Marketing Income- Should You Fake it ‘Til You Make it?

  • On January 17th, 2009 at 12:05 pm, Ajith Edassery | DollarShower wrote:

    ‘alt’ is the keyword stuffing opportunity as well :) Probably it can have a double impact when image itself is within an anchor. Anchor text and img alt can then contain keywords. My theory :)
    Ajith Edassery | DollarShower’s last blog post..Search User: Shift in Paradigm and New SEO Requirements

  • On January 17th, 2009 at 7:34 pm, Velvet Blues wrote:

    @stratos: You’ll have to send me the link. Perhaps I missed something. ;-)

    @Jen: Yes, many people see images tags as another place to stuff keywords.

    @Ajith: Indeed. And, links can use title attributes as well. I’ve seen some people go so far as to stuff keywords in all four locations: anchor text, image alt text, image title text, link title text… They’ve got SEO down to a science.

    And apparently, you know all about this. …your theory. ;-) I don’t know about the double impact, but by having such a high concentration of keywords in that location, I don’t think that Google will have any problem ascertaining the subject… :-)

  • On January 17th, 2009 at 8:25 pm, Ben Pei wrote:

    I see high importance in having ALT for your images because like you said, google don’t see the images, they look at the ALT. People often overlook this simple step when it comes to on page SEO.

    Ben Pei’s last blog post..Why I Think It’s Important To Have A “Must Read” Section

  • On January 18th, 2009 at 10:49 am, Kurt Avish wrote:

    Adding the alt text for sure works. Its mostly good for google image traffics.

    Kurt Avish’s last blog post..What is Time? What is the real time?

  • On January 18th, 2009 at 5:10 pm, Kim Woodbridge wrote:

    I try to use alt for images but never use title. I actually didn’t know what it was for so thanks for the write-up :-)
    Kim Woodbridge’s last blog post..(Anti) Social-Lists 1/18/09

  • On January 18th, 2009 at 8:22 pm, Nihar wrote:

    Nice tutorial for those who have the confusiont between the both. I always use both alt and title and I also get some search visits from images.google.com

    Nihar’s last blog post..Browser stops working after starting uTorrent client

  • On January 18th, 2009 at 10:22 pm, Velvet Blues wrote:

    @Ben: Yes, it is a simple step and it does a whole lot for optimization.

    @Kurt: You’d be surprised how much traffic people get for images. But it also helps the overall keyword optimization of the page.

    @Kim: I also rarely use titles, especially on WordPress-driven websites. But when I hand-code sites I usually do add alt and titles.

    @Nihar: About 1.5% of my visits from Google come from the ‘image’ search. Do you get a lot more visits from images.google.com? What’s your relative percentage?

  • On January 19th, 2009 at 9:26 pm, Ben Barden - Blog Tips wrote:

    Nice summary, but I believe this is incorrect:

    “Additionally, alt text is typically shown when users hover over an image.”

    This only happens in Internet Explorer. IE wrongly uses the alt attribute as title text. This may have changed in IE7/8 but it was certainly incorrect in IE6.

    Ben Barden - Blog Tips’s last blog post..10 ways to climb to new heights with Twitter

  • On January 20th, 2009 at 3:33 am, Kurt Avish wrote:

    I wont hide this. But about 30% of my google traffic is from google image. However weird as it is… i only get traffic from google image when I am sleeping lol. I mean when its night here :-)
    Kurt Avish’s last blog post..What is Time? What is the real time?

  • On January 20th, 2009 at 7:34 am, Velvet Blues wrote:

    @Ben Bard: Yes, you are right. That was a slip. If you look under ‘Title’, I explained it more accurately. ‘ALT’ is used by default in IE. And the ‘TITLE’ is used by other browsers. But now in IE 7/8, the TITLE attribute overrides ALT. Thanks for catching that.

    @Kurt: Wow, 30%! That is quite surprising. When it is night there, it is daytime in the Americas… So, we might be sending you that traffic. :-)

  • On April 28th, 2009 at 10:05 am, seb wrote:

    nice explanation! Now I understand the difference between each tag.

    I always copy/paste my alt text tag in my title tag…Do you know if this has a side effect?

    Tks!

  • On June 24th, 2009 at 10:25 am, Monica wrote:

    I’m finding that in IE 8 I can get the title but in compatibility mode it still shows my alt tag information rather than title information. Also when I go to a different computer title does not override alt in IE 7 systems.

    IE 6 of course shows alt information. Am I correct that if I want to display a specific bit of information I have to actually duplicate in alt and title?

Trackbacks

WordPress links week 4 - 2009 | WPStart.org - WordPress themes, plugins and news

Trackback URL for this entry:
http://www.velvetblues.com/web-development-blog/alt-vs-title-attributes-images-html/trackback/

Leave a Reply

CommentLuv Enabled

Want us to work on your project?

Contact us today for a quote. Click here to submit details regarding your project.

If you are making a general inquiry, send an email to info@velvetblues.com