Motive [Home].Glossary.

Guides

The Motive Web Design Glossary

alternative (alt) text, [alt tag]

The alternative text (alt) attribute provides a text-only description of an image.

Using the image for the Motive logo as an example:

<img src="/img/logo.gif" alt="Motive logo" /> \_alt text_/ \__alt attribute__/ \_________________image element______________/

If this webpage were viewed without images, then the Motive logo image (top left) would be replaced with the text: Motive logo.

How alt text is used

The alt attribute value (alt text):

What ‘problem’ does alt text solve?

Although a person can recognise an image on a webpage as ‘a coffee cup’, ‘my vacation pics’, or ‘a potted palm’; a computer program can only ‘see’ that the webpage is linking to an image file.

For example, let’s say that one of the images mentioned above has the file name: DSC_6400.JPG. The only view that a computer program has of the image is the HTML code, which might look something like this:

<img src="DSC_6400.JPG" />

Based only on the code, the computer program knows that it is dealing with an image <img...>, and might guess that the image is a photo – as JPEG files (using the file extension .JPG), are used in digital cameras – but it can’t tell if this file is the photo of the cup, the West Coast beach, or the plant.

Adding alt text gives a computer program another way of figuring-out what is in the image.

<img src="DSC_6400.JPG" alt="coffee cup" />

Now the computer knows:

The more information you provide about an image, the more ways that a computer program is able to help other people find, or use that image. For example:

Alt text tips

Alternatively known as…

Alt text is commonly, but inaccurately, referred to as an alt tag. For clarification see: elements, tags.

New Zealand Government Web Standards and Recommendations links

The New Zealand Government Web Standards and Recommendations sets out the requirements that New Zealand public sector websites must meet to make web-based information and services available to the widest possible audience. …

Related terms: accessibility, element, tag, image map, markup, metadata, search engine.

 

Motive Web Design Glossary Trivia