image search optimization using alt and title attributes in img html tags

So you inserted one or more pictures into your blog post as the SEO experts said you should, now you want to do some image search optimization so that you can rank higher for text as well as image searches. But there are two attributes in the image tag called alt and title ……. which should you use and how does it impact the SEO?

The short answer, in my opinion, is to use both the alt and title attributes.

Image tags are used to display images in HTML pages or web pages. If you have used the WordPress functionality to insert an image into your blog post or any other form-based insert image functionality for that matter, you should have seen the web form that you had to fill out with all the supported options. There is a Title, Alternate Text, Caption and a Description field that you can use to describe the image. Caption is actually used by many WordPress themes to display a visual description of the image on the page, usually below the image.

There has always been some confusion as to how, when to use alt and title attributes when displaying a image. According to the W3C img tag specifications, the alt attribute is an image specific attribute while title is an element specific attribute which is inherited by the image tag by virtue of it being an element.

The alt attribute is defined as “specifies alternate text for the image”  while the  title attribute is defined as “specifies extra information about the element.”

Impact on Image Search Optimization (ISO)

So, as you can see neither of the tags were designed for SEO but were meant for visitors using a web browser. The alt attribute is displayed when the image displayed itself cannot be displayed for any reason, while the title attribute is displayed while you hover over the image, atleast in most standards compliant web browsers.

Even though the title and the alt attributes are defined for human users, it does affect the SEO and search ranking in various search engines. The alt attribute is often noted as the most important as Google and other search engines recognize it as the description for the image. The title attribute itself can be a more elaborate description of the image, while it also serves the same purpose as the anchor text if the image itself is a link. As you can always specify the title attribute on an image tag, whether or not it is actually a link, I do not see any negative impact on it being specified.

So, in the case your image is also a URL link the alt (or alternate text) describes the image itself while the title attribute describes the page that it is linked to.

But if it is not a link and you specify the title attribute, does it hurt ? No, it should not and when used correctly could actually enhance your keyword density in the page.

It is probably a good idea not to specify the same keyword or key phrase for both the alt and the title, as it could be mistaken as an attempt of keyword stuffing. Use your primary keyword but create two different phrases.

Also, important to image search optimization is the text around the img tag. In addition to the alt text specified in the img tag, the search engines also looks for text which immediately precedes or succeeds the tag to find and verify the content of the image. So, insert the image around a text which describes or associates the image with your blog content the best.

Equally important as the alt attribute is the file name of the image. Always, name the image file name to something which is appropriate to the image. Always use hyphens to separate the words in the file name than underscores. As an example, the filename firefox-window-screenshot.jpg is always better than firefoxwindow1.jpg or firefox_win1.jpg or f123.jpg.

Using these attributes appropriately and correctly can often bring in some traffic from the image specific searches in addition to the text or web searches.

(Image courtesy of  Paloma Gomez)