Image Alt Text: How to Write It for Accessibility and SEO

Alt text is a short written description of an image, stored in the page's code. Screen readers read it aloud to people who cannot see the picture, browsers show it when the image fails to load, and search engines use it to understand what the image shows. Good alt text is accurate, brief and written for a person first.
Why alt text exists
Many visitors do not see your images the way you do. Some use screen readers because they are blind or have low vision. Some are on a slow connection where pictures do not load. Some use a text-only browser. For all of them, the alt text is the image. If it is missing, a screen reader often announces the file name, which is usually meaningless, such as a string of letters and numbers.
What to write
Ask yourself: if I could not show this picture, what would I say to a friend to give them the same information? Write that. Describe what matters in the context of the page, not every detail.
- Keep it short, usually under about 125 characters, because some screen readers handle long text poorly.
- Do not start with "image of" or "picture of". Software already announces that it is an image.
- Name the subject, the action and the setting if they matter.
- Include text that appears inside the image, such as a sign or a button label.
Examples: weak and strong
| Situation | Weak | Better |
|---|---|---|
| Product photo | IMG_2041.jpg | Blue ceramic mug with a wide handle on a wooden table |
| Team photo | team | Four colleagues laughing around a laptop in the studio |
| Chart | chart | Bar chart: visits doubled from March to June |
| Logo link | logo | Home page of Harbor Print Shop |
When the alt text should be empty
Purely decorative images, such as a divider line or a background flourish, add nothing for a person who cannot see them. For these, leave the alt attribute present but empty. A screen reader then skips the image. Do not remove the attribute entirely, because then the reader may announce the file name. If an image is a link or a button, the alt text should describe where it goes or what it does, not what it looks like.
Complex images need more
A chart, map or infographic often carries information that does not fit in a short description. Give a short alt text that states the main point, and put the details in nearby text or a table on the page. This helps everyone, including people who simply prefer to read numbers. The same idea applies to screenshots that contain steps: describe the point in the alt text and explain the steps in the paragraph around them.
How search engines use alt text
Search engines cannot fully understand every picture, so they use signals around it: the file name, the alt text, the caption and the surrounding text. Descriptive alt text helps your images appear in image search, and it supports the page's topic. Do not stuff it with keywords. A line such as "cheap shoes best shoes buy shoes online" helps nobody and looks like spam, which the guidance in the helpful content checklist discourages.
File names and captions
Give files readable names before uploading, for example "sourdough-class-hands-shaping-dough" rather than a camera number. Use a caption when the picture needs context that all readers will benefit from. A caption is visible to everyone and is read as normal text, while alt text is hidden in the code, so avoid repeating the same sentence in both.
How to audit a whole site
- Run a site crawl with a free tool and export the list of images without alt text.
- Sort by importance: homepage, key service pages and top articles first.
- Decide for each image whether it is informative, functional or decorative.
- Write or fix the text, and mark decorative images as empty.
- Check again after the next big content update.
You can also test with a screen reader or a browser extension that shows alt text, and navigate your page by listening only. It is an eye-opening exercise and ties in with the points in the colors and contrast guide.
Common mistakes
- Leaving the field empty for every image to save time.
- Using the same text on all images of a page.
- Writing paragraph-length descriptions.
- Putting important text in an image with no alt text and no text version.
- Using AI to generate descriptions and publishing them without a check. Automated text can be wrong, see the AI hallucinations guide.
A quick checklist before you publish
- Does every informative image have a description a stranger could understand?
- Are decorative images marked with an empty attribute?
- Do linked images say where the link goes?
- Is any important text inside an image repeated in real text?
- Would the page still make sense if you only heard it read aloud?
Alt text in product and portfolio pages
On shops and portfolios, images are the content. For a product, name the item, the color, the material and anything visible that a buyer would want to know, such as "Linen cushion cover in rust red, 45 by 45 centimeters, on a grey sofa". For artwork or photography, describe the subject and mood in a sentence, and put the title, medium and year in the visible caption. Each product photo from a different angle should have its own description, for example front view, back view and detail of the zipper, so a shopper using a screen reader can build the same picture as everyone else.
FAQ
Is alt text a ranking factor?
It helps search engines understand images and can help image search, but it is only one of many signals.
How long should alt text be?
Short and clear, often a single phrase and rarely more than about 125 characters.
Should I add keywords?
Only if they naturally describe the image. Never stuff keywords.
What about images of text?
Avoid them where possible. If you use one, repeat the text in the alt attribute or in the page itself.
Do I need alt text on every image?
Every image needs the attribute. Decorative ones should have it empty on purpose.
Your next step: open your five most visited pages, check each image against the "what would I tell a friend" test and rewrite the weak ones.