How to Write Alt Text for Images That Helps SEO
Your images are on the page, they look good, and yet search engines and screen readers see almost nothing in them.

Your images are on the page, they look good, and yet search engines and screen readers see almost nothing in them. That gap is what alt text fills, and learning to write alt text for images properly is one of the few SEO tasks that also makes your site better for real people on the same afternoon.
Most small sites either leave the alt attribute blank or fill it with the file name, which helps nobody. Below is a plain method for writing alt text that describes the image honestly, helps it appear in image search, and does not tip over into keyword stuffing.
What alt text is and who reads it
Alt text, short for alternative text, is a short written description stored in the alt attribute of an image in your HTML. Visitors usually never see it. Three audiences do:
- Screen reader users. Blind and partially sighted visitors hear the alt text read aloud in place of the image. Without it, they may hear a meaningless file name such as "IMG 4471 final".
- Search engines. Crawlers cannot fully understand a photo on their own, so they use alt text, along with nearby text and the file name, to work out what an image shows and when to rank it.
- Anyone on a slow or broken connection. If an image fails to load, the browser shows the alt text in its place.
In most website builders and content systems, you will find an "Alt text" or "Alternative text" field when you click on an image in the editor. If you write your own HTML, it is the alt="..." part inside the image tag.
How to write alt text for images in five steps
- Ask what the image is doing on the page. Is it showing a product, explaining a step, or just adding atmosphere? The purpose shapes the description.
- Describe what is actually there. Name the main subject, then one or two details that matter. "Hands kneading bread dough on a floured wooden board" beats "bread".
- Keep it short. Aim for roughly 8 to 20 words, and stay under about 125 characters. Some screen readers cut off or pause awkwardly on longer descriptions.
- Include your keyword only if it fits naturally. If the page is about sourdough starters and the photo shows one, say so. If the photo shows a kitchen window, do not pretend otherwise.
- Skip "image of" and "picture of". Screen readers already announce that it is an image. Start straight with the subject.
Good and bad alt text examples
Here is the same principle applied to images you might find on a small business site.
| Image | Weak alt text | Better alt text |
|---|---|---|
| Bakery storefront | bakery | Small corner bakery with a blue awning and loaves stacked in the front window |
| Product photo of a mug | mug mug ceramic mug buy mug | Handmade green ceramic mug with a speckled glaze and a wide handle |
| Step in a tutorial | step 3 | Settings menu with the "Permalinks" option highlighted in the left sidebar |
| Team photo | team | Four staff members standing outside the workshop entrance on a sunny day |
| Decorative divider line | line | Leave empty: alt="" |
Notice that the better versions are not longer for the sake of it. Each one adds the detail that would help someone who cannot see the photo understand why it is there.
When alt text should be empty
Not every image needs a description. Purely decorative images, such as background textures, divider lines, spacer graphics or a stock photo that repeats what the heading already says, should have an empty alt attribute, written as alt="" with nothing between the quotes.
That tells screen readers to skip the image entirely, which is kinder than reading out "decorative swirl" ten times on one page. Leaving the attribute out completely is different and worse: some screen readers then read the file name instead.
Images that contain text, such as a banner reading "Spring sale, 20 percent off", should repeat that text in the alt attribute. A logo that links to your home page should say the business name, for example "Hartley Garden Supplies home".
The advice I disagree with: alt text is a keyword field
Older SEO guides treat every alt attribute as another place to put your target keyword. Some plugins still nag you to include the focus keyword in every image. I think this does more harm than good.
Search engines have been clear for years that they want alt text to describe the image accurately. A page with ten photos all labelled "best plumber in Leeds" looks manipulative to an algorithm and is useless to a screen reader user, who now hears the same phrase ten times. It is the same trap described in our piece on why adding more keywords rarely helps rankings.
Use your keyword in the alt text of one or two images where it genuinely describes what is shown. Describe the rest honestly. You will rank just as well, and probably better, because the page reads as trustworthy to both people and machines.
Fitting alt text into your wider image routine
Alt text works best alongside a few other image habits. Give image files descriptive names before you upload, such as "green-ceramic-mug.jpg" rather than "DSC0091.jpg". Compress large photos so they load quickly, and make sure images below the first screen load only when needed; our guide on lazy loading images the right way shows how.
If you are adding alt text to an existing site, start with your most visited pages, then work through the rest a few posts a week. Many content systems show which images are missing alt text in the media library, so the job is easier to track than it sounds. For the bigger picture of what matters first on a young site, see our SEO basics for a new website.
Frequently asked questions
How long should alt text be?
Most alt text works well at 8 to 20 words, or under about 125 characters. That is long enough to describe the subject and one or two key details. If an image is complex, such as a chart, keep the alt text short and explain the full detail in the text on the page.
Does alt text help SEO?
Yes. Alt text helps search engines understand what an image shows, which can help it appear in image search and adds context to the page. It is a small ranking signal on its own, but it also improves accessibility, which supports a better experience overall.
Should every image have alt text?
Every image should have an alt attribute, but not every image needs a description. Informative images such as products, diagrams and screenshots need descriptive alt text. Purely decorative images should use an empty alt attribute so screen readers skip them.
More in SEO
SEO
How to Write a robots.txt File for a Small Website
Someone on a forum tells you your site needs a robots.txt file, so you paste in a block of rules you found, upload it, and move...
SEO
How to Fix Crawled Currently Not Indexed Pages in Google
You open the Pages report in Google Search Console and find 37 URLs sitting under "Crawled, currently not indexed." Google...
SEO
How to Set Up 301 Redirects When You Change a URL
You tidy up your site. A page called /services-page-2 becomes /web-design , an old blog post gets a cleaner address, and a...