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.
alt text is used The alt attribute value (alt text):
alt text in generating search results;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 to help a person find your product, service or event;alt text to describe the image to someone with a visual impairment.Alt text tipsAlt text is commonly, but inaccurately, referred to as an alt tag. For clarification see: elements, tags.
alt text: <img src="imagename.gif" alt="" /> alt text, then a screen reader will typically read out the file name. alt text (in English).alt attribute for each hyperlinked area (hotspot).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. …
accessibility, element, tag, image map, markup, metadata, search engine.
alt attributes smartly (Google)alt text.