Using the Alt and Title Image Attributes
December 11, 2008
The alt and title attributes for images are often misused and sometimes confused. The alt attribute should provide a textual description of the image for users who cannot see the images on the page. This includes users with disabilities, users with images turned off, and search engines. The description should describe the intent of the image, instead of what it literally looks like. If the image is purely decorative the alt attribute should be left empty. In some instances the alt attribute is instead filled with keywords to try to improve search engine rankings. Not only will this make the page hard for users who can not see the images to use, but search engines will are able to detect this and may penalize the website for this. The title attribute is used to provide the user with some form of supplementary information. The contents of the title attribute will pop up when the mouse hovers over the image, this sometimes referred to as a tooltip. Some confusion between the attributes is caused because Internet Explorer handles the alt attribute differently than other web browsers. If no title attribute is provide Internet Explorer will display the contents of the alt attribute when the image is hover over, other web browser will not display anything.