
Short answer: Alt text is the written description in an image’s alt attribute. Screen readers read it aloud, browsers show it when the image fails to load, and Google uses it to understand the image. To write it correctly, describe what the image shows and why it is on the page in one plain sentence, use a keyword only if it genuinely describes the image, and leave the alt empty for purely decorative images.
This guide is for bloggers, store owners, content editors and anyone who has seen an empty “Alternative text” box in WordPress and typed a keyword into it out of habit. You will learn what alt text does for SEO and accessibility, how to decide what each image needs using the decision flow below, and how to write good alt text for product photos, charts, logos and linked images, with before and after examples.
What is alt text?
Alt text (alternative text) is a short description added to an image in HTML markup:
<img src="black-office-chair.webp" alt="Black leather office chair with high back and padded armrests">
It is often called an “alt tag”, but strictly it is an attribute of the <img> tag. It does three jobs:
- Accessibility: screen readers such as NVDA, JAWS and VoiceOver read it aloud for blind and low-vision users.
- Fallback: if the image does not load, on a slow mobile connection for example, the browser shows the alt text instead.
- Search: Google reads it, along with the file name and surrounding text, to understand what the image shows.
Alt text vs title attribute vs caption
| Element | Who sees it | Purpose | SEO value |
|---|---|---|---|
| Alt text | Screen reader users, search engines, anyone when the image fails | Replaces the image for people who cannot see it | Main text signal Google uses for the image |
| Caption | Every visitor, below the image | Adds context or credit | Google also reads captions as context |
| Title attribute | Mouse users on hover; often ignored by screen readers | Optional extra information | Little to none |
| File name | Mostly no one; part of the image URL | Identifies the file | A small hint Google uses |
A caption and alt text should not repeat each other word for word, because a screen reader user would hear the same text twice. Use the alt to describe the image and the caption to add context.
Does alt text help SEO?
Yes, mainly for image search and for helping Google understand the page. Google’s image SEO best practices describe alt text as the most important attribute for providing metadata about an image, and say it is used together with computer vision and page content to understand the subject. When an image is a link, its alt text also works like anchor text for that link. The same page warns against filling alt attributes with keywords, which Google says makes a poor user experience and may cause the site to be seen as spam.
What alt text does not do is lift a weak page by itself. It is one small on-page signal. Its real value is that it makes images findable in Google Images and Lens, and makes the page usable for everyone. If you want the wider picture, my guide to image SEO optimisation covers file names, formats, compression and sitemaps.
Why accessibility matters here too
Missing alt text is one of the most common accessibility failures on the web: the WebAIM Million 2025 report ranks it second among the most frequent detectable WCAG failures on home pages, and found that 44% of images missing alt text were linked images, which leaves screen reader users unable to tell where a link goes. WCAG success criterion 1.1.1 requires a text alternative for non-text content, and accessibility laws in the UK, EU and US refer to WCAG. For a business site, that is reason enough to get alt text right regardless of SEO.
Rather have an expert do this for you?
Hand it over and get back to running your business.
What alt text does this image need?
The right alt depends on the image’s job on the page, not on what it looks like. I use the W3C’s alt decision tree as the basis for this simplified version.
Which alt text should this image have?
Is the image inside a link or button (a linked logo, an icon button, a clickable banner)?
Does the image contain text, such as a quote graphic, a sale banner or a screenshot of words?
Does the same text already appear as real text right next to the image?
Does the image add information or meaning that a reader would miss without it?
Is it a chart, graph, diagram or infographic with data?
Result: describe the action or destination. Write what happens when it is clicked, for example “Saad Raza SEO home” for a header logo or “Search” for a magnifying-glass button. Do not describe the picture itself.
Result: empty alt (alt=””). The image is decorative or repeats nearby text, so screen readers should skip it. Keep the attribute but leave it empty; do not delete it, or some screen readers read out the file name.
Result: put the image’s text in the alt. Type out the words in the image, for example “Eid sale: 20% off all kurtas until 15 March”. Better still, move important text out of the image into HTML.
Result: short alt plus the data on the page. Use the alt for the key takeaway (“Bar chart: organic clicks rose each month from January to June 2026”) and give the full figures in a table or paragraph next to it.
Result: a brief, specific description. One plain sentence describing what the image shows that matters for this page: subject, key detail, and setting or action if relevant.
How to write alt text correctly, step by step
- Decide the image’s job using the flow above. Most mistakes come from skipping this step and describing a logo or a decorative divider in detail.
- Write what matters for this page. The same photo of a chef can need “Chef plating biryani in a restaurant kitchen” on a restaurant page and “Head chef Ali Raza” (an illustrative name) on a team page.
- Be specific. “Red lawn suit with white embroidered neckline” helps a shopper and Google; “dress” helps no one. The same habit makes product descriptions rank better.
- Keep it short. There is no official limit, but one sentence is usually enough. Many accessibility practitioners suggest keeping simple images to around 125 characters; treat that as a guide rather than a rule.
- Skip “image of” or “picture of”. Screen readers already announce it is an image. Do say “Screenshot of” or “Illustration of” if the type matters.
- Use the keyword only if it truly describes the image. On a page about “AC repair in Karachi”, a photo of a technician servicing a split unit can fairly be “Technician cleaning the filter of a split AC unit in a Karachi flat”. A photo of the team at a picnic cannot.
- Write in the page’s language. On Urdu or bilingual pages, write the alt in the language of the surrounding text.
- Proofread. Typos and file names left in alt text are read aloud exactly as written.
Alt text examples: bad, better, best
| Image | Bad | Better | Best |
|---|---|---|---|
| Product photo | shoes best shoes buy shoes online | Running shoes | Men’s grey mesh running shoes with white sole, side view |
| Blog photo | IMG_2231.jpg | Laptop on a desk | Search Console Performance report open on a laptop beside a printed audit checklist |
| Chart | chart | Traffic chart | Line chart: organic sessions doubled between March and September (figures in the table below) |
| Linked logo | logo | Company logo in blue | Example Co home |
| Decorative divider | decorative line separator image | Divider | alt=”” (empty) |
| Team photo | SEO experts Karachi best SEO company | Our team | Five members of the support team outside the Gulistan-e-Johar office |
All examples are illustrative. Notice that the “bad” column is mostly keyword stuffing or file names, which matches the patterns WebAIM found across real sites.
Worked example: writing alt text for one product page
An online store sells a hand-embroidered cushion cover with four photos. Photo 1 (main): “Mustard yellow cushion cover with white hand-embroidered floral pattern, 16 x 16 inches”. Photo 2 (close-up): “Close-up of the chain-stitch embroidery on the cushion cover”. Photo 3 (lifestyle): “Cushion cover on a grey sofa beside two plain white cushions”. Photo 4 (size guide graphic with text): its text typed into the alt, or better, the size chart written as an HTML table under the gallery with alt=”” on the graphic. Each alt is different, each describes what that photo adds, and the product name appears naturally once rather than four times.
How to add alt text in WordPress, Shopify and other platforms
- WordPress: select the image in the Media Library or editor and fill in “Alternative Text”. My guide to optimising blog images covers the full upload workflow. Note that text set in the Media Library is the default for new inserts; editing it later does not always update images already placed in posts, so check older content separately.
- WooCommerce and Shopify: each product image has an alt field. In Shopify, open the product, click the image and choose “Add alt text”. For large catalogues, see my WooCommerce SEO setup guide for bulk approaches.
- Page builders: Elementor and similar builders have an alt field per image widget, but background images set in a section’s style settings have no alt and are not indexed by Google. Use an image widget for anything meaningful.
- Social platforms: X, LinkedIn, Instagram and Facebook all allow custom alt text when posting. It does not affect your site’s SEO but does make posts accessible.
How to audit alt text across a site
On audits I check alt text in three passes:
- Crawl: run Screaming Frog or a similar crawler and export images with missing alt attributes, empty alt and very long alt. Prioritise linked images and images on high-traffic pages. My free on-page SEO checker also flags images without alt text on a single URL.
- Spot check: use the WAVE browser extension or Chrome DevTools on your main templates (home, product, category, blog post) to see alt text in context.
- Listen: turn on VoiceOver (Mac and iPhone) or NVDA (free on Windows) and listen to one key page. It is the fastest way to hear stuffed or useless alt text the way users do.
Then look at the image search type in Search Console’s Performance report to see which images already earn impressions. Alt text issues often sit alongside other on-page problems, so a full on-page SEO review is worth doing at the same time.
Common alt text mistakes I find
- Keyword stuffing: the same target phrase on every image. It reads badly aloud and Google lists it as something to avoid; see avoiding over-optimisation.
- File names as alt text: some themes and import tools copy the file name in automatically.
- Identical alt on every gallery photo: the product name repeated ten times tells users nothing about what each photo shows.
- Describing the look of linked logos and icons instead of where they lead.
- Important text inside images: prices, offers and phone numbers baked into banners with no alt.
- AI-generated alt text published unchecked: automatic tools are a useful first draft, but they cannot know why the image is on your page and they misread charts and screenshots. Review every one.
Alt text checklist
- Every img has an alt attribute: filled in, or deliberately empty.
- Decorative images use alt=””: dividers, background shapes, purely visual icons.
- Linked images describe the destination: not the picture.
- Text in images is in the alt or in HTML nearby.
- Charts have the data on the page: the alt gives the takeaway.
- Each alt is specific to its image: no repeated alt across a gallery.
- No “image of” or file names.
- Keyword used only where it describes the image.
- Alt and caption do not repeat each other.
- Language matches the page.
- Checked once with a screen reader.
Ticks are saved in your browser.
Frequently asked questions
What is the difference between alt text and an alt tag?
They mean the same thing in everyday use. Technically, alt is an attribute of the HTML img tag, so “alt attribute” or “alt text” is more accurate than “alt tag”.
How long should alt text be?
There is no official limit from Google or WCAG. One clear sentence is usually enough, and many practitioners suggest around 125 characters for simple images. Complex images such as charts should keep the alt short and put the detail in the page.
Should I put keywords in alt text?
Only when the keyword genuinely describes the image. Google warns against filling alt attributes with keywords. Accurate descriptions naturally include relevant terms more often than you might expect.
Does every image need alt text?
Every image needs an alt attribute, but not every image needs a description. Decorative images should have an empty alt (alt="") so screen readers skip them.
Can I use AI to write alt text?
As a first draft, yes, especially for large product catalogues. But AI tools cannot know why an image is on a specific page, and they often misdescribe charts, screenshots and people. Check and edit each one before publishing.
Does alt text help with Google Lens and AI search?
Google uses alt text, page content and computer vision together to understand images, and Lens relies heavily on visual matching. Accurate alt text and clear surrounding text help Google connect your image to the right topic; it is not a separate optimisation. My guide to visual search optimisation covers Lens in more detail.
Sources
- Google Search Central, “Image SEO best practices” (last updated 2026).
- WebAIM, “The WebAIM Million: The 2025 report on the accessibility of the top 1,000,000 home pages” (2025).
- W3C Web Accessibility Initiative, “An alt Decision Tree” (updated 2024).
Fixing alt text is a good first job for anyone new to SEO because it improves accessibility and image search at the same time. If you would like your images, templates and accessibility issues checked together, my SEO audit service covers them, or you can ask me directly.
Request received
Thank you! Saad will contact you within the next 24 hours.
Keep an eye on your phone and inbox.
