An image alt tag is the alt attribute on an HTML <img> element: a short text description of the image. Screen readers announce it, browsers show it when the image fails to load, and Google uses it, together with computer vision and the page around the image, to understand what the image shows. For SEO, the short rules are: describe the image specifically, use a keyword only when it honestly describes the image, keep it to a sentence or less, and leave alt="" on purely decorative images.
Image Alt Tags
Image alt tags (the alt attribute) are short text descriptions added to an image’s HTML that convey the image’s content and function for screen readers, supply fallback text when the image fails to load, and give search engines readable text to understand and index the image.
Alt tag or alt text?
Same thing. Strictly, alt is an attribute of the <img> tag, so “alt attribute” or “alt text” is the precise name, and “alt tag” is the name most people search for. This is what it looks like in the HTML:
<img src="/img/dalmatian-puppy-fetch.jpg" alt="Dalmatian puppy playing fetch">
Google’s own image documentation uses this example. It marks “Dalmatian puppy playing fetch” as the best version, ahead of a bare “puppy” and far ahead of a string of dog-related keywords.
What alt text does for SEO and accessibility
The alt attribute does three jobs at once:
- Accessibility. Screen readers announce the alt text in place of the image, so a user who cannot see the screen still gets the content. Text alternatives for images are the first success criterion in WCAG (1.1.1, Level A), the standard accessibility laws commonly point to.
- Fallback. When the image fails to load (slow connection, broken path, blocked CDN), the browser shows the alt text where the image would have been.
- SEO. Google’s image documentation calls alt text the most important attribute for giving it metadata about an image. Google combines it with computer vision and the content of the page, including captions and nearby text, to work out what the image shows and which searches it fits in Google Images. When an image is a link, its alt text also works as the link’s anchor text.
Does missing alt text hurt SEO?
It costs you, and Google issues no penalty for it. A missing alt is a missed opportunity: Google has less to go on for image search, and a linked image (a logo, a product tile) passes no anchor text. Stuffed alt text is the version that can actively hurt: Google’s documentation warns that filling alt attributes with keywords “may cause your site to be seen as spam.”
The bigger cost of missing alt text is outside Google. Screen-reader users get nothing, and if you sell online in the EU, the European Accessibility Act has applied to many e-commerce sites since 28 June 2025.
What the markup looks like
A good alt describes the subject and, where it matters, the action and context:
<!-- Informative image: describe subject + context -->
<img src="/img/blue-running-shoes.jpg"
alt="Blue Nike running shoes on a wooden gym floor">
<!-- Functional image (a link or button): describe what it does -->
<a href="/cart"><img src="/icons/cart.svg" alt="View shopping cart"></a>
<!-- Decorative image: empty alt so screen readers skip it -->
<img src="/img/divider.svg" alt="">
The difference between alt="" and no alt attribute at all matters. An empty alt="" tells assistive technology to skip the image. A missing attribute makes some screen readers read out the file name (blue-running-shoes-final-v2.jpg), which is worse than silence.
One more rule for SEO: alt text only helps on a real <img> element. Google finds images in the src of <img> tags and says plainly that it does not index CSS images, so a product photo set as a CSS background will not show up in Google Images, whatever you write.
Alt tags for images: examples
| Image | Weak alt text | Strong alt text |
|---|---|---|
| Product photo | alt="shoes" | alt="Blue Nike Pegasus running shoes, side view" |
| Chart in a blog post | alt="seo seo ranking keywords graph 2026" | alt="Line chart showing organic traffic up 38% over six months" |
| Team photo | alt="image1" | alt="Two founders reviewing a site audit at a desk" |
| Logo linking to the homepage | alt="logo" | alt="Acme Analytics home" |
| Cart icon link | alt="icon" | alt="View shopping cart" |
| Decorative divider | alt="divider line image decorative" | alt="" |
The strong versions pass one test: read aloud to someone who cannot see the screen, they convey what the image is there for. The weak ones either say nothing or read like a keyword list.
How to write alt text that works
Describe the image as if reading it aloud to someone who cannot see it, then check that it fits the page:
- Be specific. Name the subject, the action and the details that matter to the page. “Golden retriever puppy chewing a rope toy” beats “dog.”
- Include the keyword only when it is honest. One natural keyword is fine if it describes the image. Forced phrases are keyword stuffing, which Google says can get a site treated as spam.
- Complement the caption. If the caption or nearby text already says it, use the alt for the part the caption left out.
- Keep it short. A phrase or one sentence. Google publishes no length limit, and the 125-character figure quoted everywhere is a rule of thumb from older screen readers. Long alt text is still tiring to listen to; if an image needs a paragraph, put that paragraph in the body copy.
- Match the image’s role. For functional images (a clickable icon or button), describe the action (“Download PDF”).
- Use
alt=""for purely decorative images. Background flourishes, spacers and ornamental dividers should be skipped by assistive technology.
Should you use an AI alt text generator?
As a first draft, yes, with review. Generators describe what is visible, and they are often good at it. What they cannot know is why the image is on the page: which product variant it shows, what the chart is meant to prove, what the button does. They also tend to guess details such as model names and colors. The descriptions that help screen-reader users are the ones that carry the image’s purpose, so treat generated alt text as a draft a person checks. On catalogs, alt text built from your own product data (name, color, angle) is usually more accurate than a vision model’s guess.
Alt text vs. the other “image text” fields
| Field | Who reads it | SEO weight | When to use |
|---|---|---|---|
alt attribute | Screen readers, search engines, fallback rendering | High: Google’s most important image attribute | Always, on every informative or functional image |
| Image file name | Search engines | Low: Google says it can give clues about the subject | Short, descriptive, hyphenated names (blue-running-shoes.jpg) |
Caption (<figcaption>) | All users, on-page | Moderate: Google reads captions and nearby text | When extra visible context helps the reader |
title attribute | Hover tooltip only | Negligible | Rarely; it cannot substitute for alt text |
A useful pre-publish check: read only the alt attributes in the HTML. If the page still makes sense and each image’s purpose is clear, your alt text is doing its job. This is the same kind of pass we run in a broader SEO content audit.
Where alt text fits in the bigger picture
Alt text is a small, high-leverage piece of on-page SEO: cheap to get right, easy to neglect at scale. At a few dozen images it is a manual habit; at thousands of programmatic pages, it is a templating and QA problem. On large catalogs we generate alt text from structured product data and spot-check samples, the same engineering-first approach behind our programmatic SEO work. It sits next to the H1 tag and the image’s structured data as part of telling Google what a page is about.
When alt text becomes a business problem
A blog with 50 images and a handful of empty alts is an afternoon’s work in your CMS. You do not need anyone for that.
It costs money when the gap sits in a template. A product template that prints alt="" or the SKU on 8,000 photos. A theme that wraps the logo in a link with no alt, so every page links home with empty anchor text. A CMS migration that dropped the alt field. Images loaded as CSS backgrounds, invisible to Google Images. An accessibility audit that lands before anyone at the company has looked. For catalogs, recipes and how-to content, image search is a real channel, and these failures switch it off sitewide.
On a fractional SEO engagement, the two founders fix it once in the template, generate alt text from your product data where it exists, and check samples by hand until it holds.
Frequently Asked Questions
What is an alt tag for images?
An alt tag is the alt attribute of an <img> element: a short text description of the image. Screen readers read it aloud, browsers display it when the image cannot load, and search engines use it to understand the image. Technically it is an attribute, which is why you will also see it called alt text or the alt attribute.
Do image alt tags help SEO?
Yes. Google calls alt text the most important attribute for image metadata and uses it, with computer vision and page content, to understand and rank images in Google Images. On a linked image it also acts as anchor text. It will not rank a page on its own. It is cheap and high-leverage.
Is there an SEO penalty for missing alt text?
No. Google does not penalize pages for missing alt text; you simply lose image-search visibility and anchor text on linked images. Keyword-stuffed alt text is different: Google warns it may cause your site to be seen as spam. The larger cost of missing alt text is accessibility, for users and, in some markets, under the law.
How long should alt text be?
A short phrase or one sentence. Google sets no limit, and the widely quoted 125-character limit is a rule of thumb from older screen readers. Describe the subject, the relevant action and the key details, then stop. If an image needs a paragraph of explanation, put it in the visible body copy.
What is the difference between alt text and a caption?
Alt text lives in the alt attribute and is read by screen readers and search engines, or shown when the image fails to load. A caption (<figcaption>) is visible to everyone on the page. Use captions for context that helps all readers, and alt text to describe the image itself; keep them complementary.
Should decorative images have alt text?
Give them an empty alt="" so assistive technology skips them. Spacers, ornamental dividers and background flourishes add nothing to the content, and announcing them clutters the experience. An empty alt="" is different from leaving the attribute out, which can make some screen readers read the file name aloud.