SEO & Search Marketing

How to Write Alt Text: 20 Examples for SEO and Accessibility

Everyone agrees alt text is important. Far fewer people agree on how to write it. Should it include keywords? How long should it be? Do you describe the colours, the people, the mood? What about…

Everyone agrees alt text is important. Far fewer people agree on how to write it. Should it include keywords? How long should it be? Do you describe the colours, the people, the mood? What about logos, icons, charts and buttons? Most guidance stays abstract, which is why so many sites end up with alt text that is either missing or a jumble of keywords.

This guide takes a practical approach: a simple method for writing alt text, followed by twenty before-and-after examples across the image types you will actually meet.

What Alt Text Is For

Alt text is a text alternative for an image. It is read aloud by screen readers, displayed if the image fails to load, and used by search engines to understand what the image shows.

The single question to ask when writing alt text is:

If someone could not see this image, what would they need to know about it to get the same value from the page?

That question solves most dilemmas. It tells you to describe what matters, skip what does not, include any text the image contains, and leave decorative images silent.

A Simple Method for Writing Alt Text

  1. Decide whether the image is meaningful or decorative. If removing it would lose no information, it is decorative and gets alt="".
  2. Identify its purpose on this page. Is it showing a product? Illustrating a step? Acting as a link? Presenting data?
  3. Describe the part that serves that purpose. Not every detail, only what matters in context.
  4. Include any text in the image. Words in a banner, a sign or a screenshot.
  5. Keep it concise. Usually under about 125 characters.
  6. Skip "image of" and "picture of". Screen readers already announce images.

Tip: The same image can need different alt text on different pages, because its purpose changes. Write alt text for the page, not for the image file.

Alt Text and SEO

Search engines use alt text as one signal for understanding images, along with file names, captions, surrounding text and page context. Good alt text helps images appear in Google Images and in image results within regular search.

Keywords belong in alt text only when they accurately describe the image. A photo of a navy running shoe on a running shoe product page naturally contains the words "running shoe". That is useful. A list of keywords is not, and Google's own image SEO best practices warn against keyword stuffing in alt attributes.

20 Alt Text Examples

Product images

1. Main product photo

  • Weak: alt="shoe"
  • Weak: alt="running shoes best running shoes buy running shoes"
  • Better: alt="Aero Glide 3 men's running shoe in navy, side view"

2. Alternate product angle

  • Weak: alt="Aero Glide 3 men's running shoe in navy" (same as the main image)
  • Better: alt="Aero Glide 3 sole showing the grip pattern"

3. Product in use

  • Weak: alt="lifestyle image"
  • Better: alt="Runner wearing Aero Glide 3 shoes on a wet city pavement"

4. Colour swatch

  • Weak: alt="swatch"
  • Better: alt="Forest green"

People

5. Team member photo on an About page

  • Weak: alt="photo"
  • Better: alt="Priya Shah, head of customer support"

6. Stock photo in a blog post

  • Weak: alt="business people"
  • Better (if it illustrates a point): alt="Two colleagues reviewing a printed sales report"
  • Better (if it is purely decorative): alt=""

Logos and brand images

7. Header logo linking to the home page

  • Weak: alt="" (the link has no name)
  • Weak: alt="logo"
  • Better: alt="SEO Wolf home page" or simply alt="SEO Wolf"

8. Client logos in a "trusted by" strip

  • Weak: alt="logo1"
  • Better: alt="Acme Logistics"

Images containing text

9. Promotional banner

  • Weak: alt="banner"
  • Better: alt="50% off all winter boots until Sunday"

10. Customer testimonial graphic

  • Weak: alt="quote"
  • Better: alt="Customer quote: 'Delivery took two days and the fit was perfect.' Sam, Leeds"

Instructional images

11. A step in a tutorial

  • Weak: alt="step 3"
  • Better: alt="Settings menu with the Privacy tab highlighted"

12. Screenshot of an interface

  • Weak: alt="screenshot"
  • Better: alt="Google Search Console Performance report with the Queries tab open"

Charts and data

13. Simple bar chart

  • Weak: alt="chart"
  • Better: alt="Bar chart: mobile visits grew from 48% to 71% of traffic between 2020 and 2026"

14. Complex infographic

  • Short alt: alt="Infographic: the five stages of the customer journey"
  • Then explain the stages in the page text or a caption, because the details will not fit in alt text.

Functional images

15. Search icon used as a button

  • Weak: alt="magnifying glass"
  • Better: alt="Search"

16. Social media icons linking to profiles

  • Weak: alt="icon"
  • Better: alt="Follow us on LinkedIn"

17. Download button image

  • Weak: alt="button"
  • Better: alt="Download the 2026 pricing guide (PDF)"

Decorative images

18. Divider or ornament

  • Correct: alt=""

19. Icon next to text that already says the same thing

  • For a phone icon next to the words "Call us": alt=""

Food, places and editorial images

20. Recipe photo

  • Weak: alt="food"
  • Better: alt="Sliced banana bread on a wooden board with a butter knife"

Special Cases

When the image is the content

On a photography portfolio or an art gallery, the image is the point of the page. Alt text can be more descriptive here, covering composition, colour and mood, because that is what a non-sighted visitor would want to know.

When context already describes the image

If a caption or the surrounding paragraph already describes the image fully, the alt text can be shorter, or, for purely illustrative images, empty. Avoid making screen reader users hear the same description twice.

When images are purely decorative

Use alt="". Do not omit the alt attribute, because without it many screen readers read the file name aloud.

Background images in CSS

Images added with CSS backgrounds have no alt attribute and are ignored by screen readers. That is fine for decoration, but if a background image conveys meaning, the meaning must appear in text elsewhere.

The W3C's images tutorial has a decision tree for tricky cases.

Alt Text for Ecommerce at Scale

Online shops often have thousands of product images, which makes writing alt text by hand impractical. A data-driven approach works well.

Build alt text from product data

Most product databases already contain the details alt text needs: product name, brand, colour, material and product type. A template such as "{brand} {product name} in {colour}" produces accurate alt text for every main image. Gallery images can add the view: "{product name}, back view" or "{product name} sole detail".

Handle variants

If each colour variant has its own image, include the colour in the alt. If one image represents all variants, leave the colour out or name the colour shown.

Screen reader users browsing a gallery do not want to hear the full product name eight times. After the main image, describe what each extra image adds.

Category and search results pages

Thumbnail images on listing pages usually sit inside a link that already contains the product name as text. In that case, the image alt can be empty, so screen readers do not read the name twice. If the image is the only content of the link, it needs the product name as its alt.

Check what the platform outputs

Shopify, WooCommerce, Magento and other platforms each handle alt text differently. Some use the image's stored alt, others the product title, and some themes ignore both. Audit a product page after any theme change.

How Long Should Alt Text Be?

There is no strict limit, but a practical guide:

  • Most images: a short phrase or sentence, under about 125 characters
  • Product images: product name plus the key visible detail
  • Charts: the key takeaway in one sentence, with details elsewhere
  • Art and portfolio images: longer descriptions are acceptable

If alt text runs to several sentences, consider whether some of it belongs in a caption or the body text.

Auditing Alt Text on Existing Pages

Writing good alt text for new images is the easy part. Most sites also have years of old images with missing or poor alt text. To find them, extract every image from a page with its alt attribute and review the list. An image alt text auditor does this from the page source, flagging missing alt, file-name placeholders, keyword stuffing, overly long descriptions and linked images with no name.

Fix linked images first, because a link with no name is the most disruptive problem for screen reader users. Then fix templates, since product, category and blog templates usually generate most of a site's alt text.

Building Alt Text Into Your Workflow

  • Make alt text required when images are uploaded to your CMS
  • Write alt text when you choose the image, while its purpose is fresh in your mind
  • Use product data to generate alt text for product images automatically
  • Review alt text in content QA, alongside titles, headings and links
  • Re-audit key templates after redesigns, because themes and page builders sometimes drop alt attributes

Common Mistakes

  • File names as alt text. "IMG_2041" or "hero-final-v3.jpg"
  • Generic words. "Image", "photo", "graphic", "picture"
  • Keyword lists. Alt text is a description, not a tag cloud
  • Identical alt on different images. Each image needs its own description
  • Describing decorative images. They should be silent
  • Leaving linked images empty. The link becomes nameless

Frequently Asked Questions

Should alt text include keywords?

Only where they accurately describe the image. Natural, descriptive alt text often includes relevant terms without trying.

Is alt text the same as an image title?

No. The title attribute shows as a tooltip on hover and is not a reliable substitute for alt text.

Do I need alt text for every image?

Every image needs an alt attribute. Meaningful images need a description; decorative images need an empty one.

What is the maximum length for alt text?

There is no strict maximum, but under about 125 characters is a good working limit for most images.

Does AI-generated alt text work?

Automatic descriptions can be a useful starting point, but they describe what is in the image, not why it is on the page. Review and edit them.


Good alt text is a habit, not a project. Start by finding what is missing: paste your key pages into the Image Alt Text Auditor, fix the linked images and templates first, and use the examples above as a reference for every image you add from now on.