Alt text: describe an image’s information or function
Alt text is a textual replacement that conveys an image’s information or function. For an HTML image, it is supplied through the alt attribute. It helps people who cannot see the image and can help search engines understand it. The right wording depends on the image’s role on that page.
Also known as: alt text · alternative text · image text alternative
At a glance
- Describe information or function rather than listing keywords.
- A purely decorative image can use an empty alt value; a missing attribute is different.
- Complex diagrams often need a fuller explanation or data table beside the image.
On this page

Who does alt text help?
Someone using a screen reader may not see the image. A file may also fail to load. Alternative text conveys the information or purpose that would otherwise be lost.
The W3C images tutorial distinguishes informative, decorative and functional images by role. The same photograph can need different treatment when used on different pages.
What should an informative image describe?
Be concise and specific about the important detail. In a maintenance guide, the image may show which way a filter lifts out. Calling it simply “air conditioner” does not communicate that information.
<img src="removing-filter.webp" alt="Dust filter lifting upward beneath the indoor unit’s open cover">
Describe what the picture actually shows. Do not invent a repair step or safety detail absent from it. A caption may provide additional explanation without automatically repeating every word of the alt text.
When is empty alt appropriate?
An image that serves only as decoration and adds no independent meaning can use alt="". That explicitly indicates that there is no separate visual information to convey. Omitting the attribute is different: assistive technology may read the filename instead.
The W3C decision tree considers the image's content, context and function. A decorative divider or a complete visual repetition of nearby text may not require a separate description.
If an image acts as a button or link, communicate its function. As with anchor text, explain the destination or action instead of merely describing the icon's color and shape.
Example: three bicycle-workshop images
A fictional workshop article includes a comparison between a worn brake pad and a new one. Its alt text explains the visible difference.
A second photograph sits behind the page heading for atmosphere and carries no independent instructional meaning. Empty alt may be appropriate there.
A third image is a clickable company logo leading home. Its text alternative should make the business identity and navigation understandable. Using the same bicycle-repair phrase for all three would ignore their different roles.
How does alt text relate to SEO?
Google's image guidance describes using surrounding text, image information and alt text to understand pictures, while discouraging keyword stuffing.
A relevant keyword can appear naturally, but alt is not a hidden advertising slot. Accessibility and SEO align when the text accurately conveys actual visual information.
Image compression reduces file size and responsive images help deliver a suitable variant. Neither replaces a textual alternative.
What about a complex diagram?
A multi-series chart or detailed process diagram may contain more information than a short alt attribute can communicate. Provide an explanation, data table or equivalent text alongside it. The alt can identify the diagram and point to that fuller explanation.
The essential meaning should remain available without seeing colors, tiny labels or spatial arrangement. This also helps sighted readers understand the illustration quickly. Image SEO considers the image and surrounding page; web accessibility additionally covers matters such as keyboard use and understandable structure.