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

Write alt text that helps screen reader users and SEO: good vs bad examples, 5 simple steps, special cases like charts and logos, and alt text for AI images.

How to write alt text for images guide cover with an image icon

Table of Contents

Good alt text describes what an image shows and why it is there, in one short, specific sentence, usually under about 125 characters. Write it for someone who cannot see the image: “Woman packing handmade candles into gift boxes” instead of “image1.jpg” or “candles candles buy candles”. Include a keyword only when it naturally describes the image, leave alt text empty (alt=””) for purely decorative images, and never start with “image of”. Good alt text helps screen reader users, helps Google understand your images and gives AI search tools accurate context.

Key takeaways
  • Describe the image and its purpose, not just the file.
  • Be specific and concise. One sentence is usually enough.
  • Decorative images get an empty alt attribute so screen readers skip them.
  • Keywords are fine when accurate. Stuffing them is not.
  • Images with text need that text in the alt or nearby on the page.

What a screen reader actually says

Imagine a blind visitor shopping on a small clothing website with a screen reader. The product page reads aloud: “Image. IMG underscore 4572 dot JPG. Image. Banner final 2. Image. Shop now.” She has no idea what the dress looks like, what colour it is or what the banner is offering. She leaves.

On a competitor’s site, the same screen reader says: “Navy cotton salwar kameez with white block-print flowers, front view.” Now she can decide. Alt text is a small thing for the shop owner, and the whole difference for her.

Search engines are in a similar position. They read your page as text, and alt text is one of the clearest signals of what an image shows.

Good vs bad alt text

ImageBadGood
Product photo“product”“Brown leather wallet with six card slots, open view”
Team photo“team team web design team Dhaka”“Tanvir WebXprt team discussing a website layout at a whiteboard”
Chart“chart”“Bar chart showing website visits rising from 2,000 to 9,000 between January and June”
Recipe step“image of food”“Dough rolled into a thin round roti on a floured board”
Decorative divider“decorative line”alt=”” (empty)

How to write alt text in 5 steps

  1. Ask why the image is thereTo show a product? Explain a step? Set a mood? The purpose shapes the description.
  2. Describe the important detailsSubject, action, colour, setting, only as much as matters for the purpose.
  3. Keep it shortAim for one sentence, usually under about 125 characters. Longer explanations belong in the caption or page text.
  4. Skip “image of”Screen readers already announce that it is an image.
  5. Add a keyword only if trueIf the photo really shows a “Bangladeshi wedding cake”, say so. Do not add words that are not in the picture.

Special cases

Images with textIf an image contains a headline or offer, include that text in the alt or make sure it also appears as real text on the page.
Linked imagesIf an image is a link or button, the alt should say where it goes or what it does: “Download the price list (PDF)”.
Charts and infographicsGive the key takeaway in the alt and the full data in a table or paragraph nearby.
LogosUse the company name: “Tanvir WebXprt logo” or simply “Tanvir WebXprt” if it links home.

Alt text for AI-generated images

AI images need alt text just like photos. Describe what the final image shows, not the prompt you used. “Isometric illustration of a small tea stall with a red awning at sunset” is helpful. “Midjourney prompt v6 tea stall isometric 8k” is not.

In WordPress, add alt text in the Media Library under “Alternative Text” when you upload, so every page that uses the image gets it automatically.

Does alt text help SEO?

Yes. Google’s image guidelines say it uses alt text, along with computer vision and the page content, to understand images. Descriptive alt text helps your images appear in Google Images and gives context to the page. It also helps AI-powered search tools describe your content accurately. But the main reason to write it is people, and good descriptions for people are exactly what search engines want.

Before you upload any image

  • Give the file a descriptive name: “navy-salwar-kameez-block-print.jpg”.
  • Resize and compress it with the image compressor.
  • Consider WebP for websites using the image converter.
  • Write the alt text using the steps above.

Practise now

Create an image with the free AI Image Generator, then write alt text for it in one sentence. Compare it with the prompt you used. If the alt text could replace the image for someone who cannot see it, you have done it right.

Sources

Frequently asked questions

How long should alt text be?

Usually one short sentence, often under about 125 characters. Put longer explanations in a caption or the page text.

Should I put keywords in alt text?

Only when they accurately describe the image. Keyword stuffing does not help users and can look spammy to search engines.

What alt text should decorative images have?

An empty alt attribute (alt=””) so screen readers skip them.

Should alt text start with "image of"?

No. Screen readers already announce that it is an image, so start with the description.

Does alt text help Google rankings?

Google uses alt text with other signals to understand images, which helps them appear in Google Images and adds context to the page.

Free toolTry the Free AI Image Generator

Turn a sentence into an image in seconds. Unlimited, no login, with style presets and social media sizes.

Open the free tool →
Written by Tanvir H

WordPress and Elementor web designer at Tanvir WebXprt, Bangladesh, with 7+ years of experience and 650+ projects. Tanvir builds the free tools on this site and writes practical guides for creators, learners and small businesses.

Learn more

Guides for this tool

Built by Tanvir WebXprt

Want a tool, website or app like this for your business?

Every free tool on this site is designed and coded by Tanvir H, a Bangladesh-based WordPress and Elementor web designer with 7+ years of experience and 650+ projects for clients worldwide. Fast, mobile-first, search-optimised websites that turn visitors into customers.

Website developmentWordPress, Elementor & e-commerce sitesfrom $899
Creative designWeb, graphic & brand identityfrom $220
SEO & paid adsRank on Google, run Meta & Google Adsfrom $300
Speed & fixesCore Web Vitals, bugs and upgradesCustom quote
  • 650+ projects
  • 7+ years
  • 4.9★ rating
  • Govt. registered freelancer

Contents

Was this helpful? Spread the word and share with your network!
Facebook
Pinterest
LinkedIn
Reddit
VK
X
Telegram
Threads
Tumblr
Email
WhatsApp
Pocket

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Article