The “alt” tag as alternative text for an image placed on a web page, has a curiously evolved history.
It started out being the fix for web browsers that couldn’t display images – yes, they weren’t a given for the early web browsers. Just when we thought we could get rid of alt-text, the blind and visually-impaired community spoke up, “Whoa! We need those to read what the picture’s about!” and so now using alt-tags became a matter of accessibility.
And now search engines use them to index images. So alt-text is here to stay. To use it, you would put:
< img src=”http://mysite/image.jpg” alt=”our company logo” / >
And you can go one further and use a title tag, which makes text pop up when the user mouses over it. To see a title tag in action, visit XKCD and hover your mouse over a comic strip. Sometimes it adds to the joke, sometimes it explains it, and sometimes it’s a secret message!
So what do you do with it? Boost your SEO! To see how that works, try searching Google images for any not-too-obvious word. Let’s try antiseptic. We get to about the eighth result after seven bottles of mouthwash and such, and then… a wallpaper image of a blob-person on a blue background. It really doesn’t have anything to do with what we were thinking of, does it? How did that happen? That’s the name of the wallpaper file, and it’s included in the alt-text.
That’s how powerful alt text can be! Just be careful to use this for good and not evil – this is also how pornography gets mixed in with search results for innocent keywords.