SEOMen SEO Course






 

05 - Alt Attribute

Last Updated December 15 2007 12:51:51.

Tag attributes should be used through your HTML pages. Tag or code attributes are bits of text that can be added to a tag or piece of code to define or describe it. These are good places to add your keywords in where a description is called for. The alt attribute is part of the img tag. You'll often see it like this:

<img src="seo-course-logo.gif" width="200" height="100" border="0" alt="SEO Course Logo" title="SEO Course">

Here you also see the use of the title attribute. This isn't new, although it really isn't used by most webmasters. If you want to check on things, it is part of the W3C specification, and therefore should be used. As well, for those surfing with IE, they will see the alt attribute information when they hover over the image. Those surfing with Mozilla (Firefox) will see the title attribute information, not the alt attribute.

In this example my keyword is SEO and my description is SEO Course Logo. I consider this good use of the attribute as it utilizes a keyword, and at the same time describes the image. Two birds with one stone so to speak. Poor birds.

W3C calls the alt attribute mandatory, so always include it. If your image is simply a spacer, or background, you may be best off not specifying it, but include the empty tag anyway as alt="". This may sound ridiculous to you, but it is in the W3C Recommendation, so it's official!

Always use a keyword or phrase in the alt tag, if at all possible but don't stuff the tag. The tag is meant for people who have images turned off in their browsers, or for browsers that don't display images. You want to portray to these people what this image is. A list of keywords doesn't do that. A nice description can however include a keyword or phrase.

I've never seen any facts about how long an alt tag should be, but common sense tells me that since it is meant to be a short description of what the image is, it should be just that. Short. Keep it to a short sentence. As a matter of fact, if you think about it, the attribute is intended for people not only surfing with images turned off, or textual browsers with no images, but for those visually and hearing impaired. The alt attribute is rendered in braile, or speech. Anything beyond a simple explanation is going to slow down the entire process of viewing a webpage to these people.

 


SEOMen Factoid
  • The alt attribute is a must have. It is meant for purposes beyond SEO, and is an integral part of any webpage. Be sure to use your keywords in this tag ONLY when they are relevant to the image they are describing.
  • Only define the image in the alt tag.
  • The alt tag is meant for those surfing the web with images turned off, or handicapped people.
  • DO NOT stuff this attribute with keywords.



   V0.7 :: 02-11-2007
   01-26-07 / 72