Tag Archives: optimize images

Why use Alt tags on Images

Why use Alt tags on Images – Make your Website more Accessible

One of the simplest ways to make your website more accessible is to use an alt attribute in your image tags. It’s amazing to me how many people forget to use this simple attribute. In fact, now, if you want to write valid XHTML, the alt attribute is required for the img tag. And yet people still don’t do it.

What is the ALT tag or Attribute?

The alt attribute is an attribute of the img tag and is meant to be an alternative for non-visual browsers when they come across images. This means, that the text is meant to be used when the image is not visible on the page. Instead, what is displayed (or read) is the alternative text. Many browsers also display the alt text when the customer rests their mouse on the image. This means that the alt tag text should be clear and easy to read and not create a huge popup nightmare for any reader pausing their mouse on your page.

Browser Support for the Alt tag

The alt attribute is supported in all major browsers.

The Alt tag – Definition and Usage

The required alt attribute specifies an alternate text for an image, if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).

Note: Internet Explorer (prior version 9) displays the value of the alt attribute as a tool-tip, when mousing over the image. This is NOT the correct behavior, according to the HTML specification.