Alt text for SEO: how to write it, with examples
Short answer Describe what the image shows or does, in a few words, as you would to someone on the phone. Use a keyword only if it truly fits the picture. Logos and buttons get their destination or action. Decorative images get empty alt text. Google uses alt text to understand images, and stuffing it with keywords can look like spam.
Want help applying this to your business? Talk it through on a free 30-minute call.
Book a callHow to write alt text: the rules
Alt text is a short description stored in the page code behind each image. Screen readers read it aloud to people who can't see the picture, and Google reads it to learn what the picture shows. Write it as if you were describing the photo to a customer over the phone.
- Say what matters in the picture. The subject, the action, and the detail that makes it yours (the place, the result, the person).
- Keep it short. A few words, sometimes one sentence.
- Skip "image of" and "photo of." WebAIM, an accessibility nonprofit, explains that screen readers already say "graphic" before the alt text, so those words repeat it.
- Match the page. The same photo can need different alt text on different pages, or none at all if the text next to it already says the same thing (WebAIM: Alternative Text).
- Use a keyword only where it's true. If the photo shows a water heater install in Tucson, saying so is honest and useful. Listing every service you offer is not.
- Links and buttons describe the action, not the picture.
- Decoration gets empty alt text (alt=""), so screen readers skip it.
| Image on a service page | Weak | Better |
|---|---|---|
| Plumber's job photo | plumber plumbing Tucson best plumber | Technician installing a tankless water heater in a garage |
| Dentist's before-and-after | image of teeth | Front teeth before and after porcelain veneers |
| Salon portfolio | hair | Balayage on shoulder-length brown hair |
| Accountant's team photo | photo of team | Our four tax preparers at the front desk of the Elm Street office |
| Logo linking to home page | logo | Smith Plumbing home |
Google's own example ranks these from bad to best: no alt text at all, a string of repeated keywords, a single word, then a short phrase naming the breed and the action (Google Search Central: Image SEO best practices).
Does alt text help SEO?
Yes, for images. Google says alt text is the most important extra detail you can give about an image:
"Google uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image." (Google Search Central: Image SEO best practices)
That helps your photos show up in Google Images and in image results for searches like "kitchen remodel ideas." If an image is a link, Google also treats its alt text like the clickable words of a text link.
What Google doesn't say:
- That accessible sites rank higher. Google's page experience guide lists Core Web Vitals, secure pages, mobile display, ads, pop-ups and clear main content, but not accessibility or alt text (Google Search Central: Understanding page experience). Write alt text for people first; that is also what Google asks.
- That alt text lowers bounce rate or lifts a whole page's ranking. No Google source says either.
And one warning it does give:
"Avoid filling alt attributes with keywords (also known as keyword stuffing) as it results in a negative user experience and may cause your site to be seen as spam." (Google Search Central: Image SEO best practices)
Which images need alt text?
Almost every image needs an alt attribute. Some need it empty. The W3C, which writes the web accessibility standard (WCAG), publishes a short decision tree. In plain terms:
| The image is | What to write | Example |
|---|---|---|
| A photo or graphic that adds meaning | A brief description of that meaning | "Roofer replacing shingles after hail damage" |
| A link or button with no text beside it | Where it goes or what it does | Logo: "Bright Dental home". Magnifying glass: "Search" |
| Text inside an image (a flyer, a coupon) | The same text, word for word | "Spring tune-up $89, until May 31" |
| A chart, price table or map | A short summary, with the full details as text on the page | "Bar chart of average repair costs; full table below" |
| Already described in the text right beside it | Empty: alt="" | A headshot next to the person's name and bio |
| Pure decoration (a swoosh, a stock texture) | Empty: alt="" | Background pattern behind a heading |
The rule behind this is WCAG 1.1.1, the first and most basic level (A): images need a text alternative that serves the same purpose, and decoration should be built so assistive technology can ignore it (W3C: Understanding Success Criterion 1.1.1).
Two things to avoid. Leaving the alt attribute out entirely is not the same as empty: WebAIM says every image should have one, and that on a linked image with no alt text, screen readers may read out the file name or the link's web address. And putting prices, hours or phone numbers only inside an image hides them from Google and from screen readers; the W3C tutorial says to avoid text in images unless it's a logo.
How long should alt text be?
No standard sets a character limit. Google gives none, and the W3C asks for "a brief description" without a number (W3C WAI: An alt decision tree). WebAIM says a few words are usually enough, and only rarely a sentence or two.
You'll often see "125 characters" quoted as a screen reader cutoff. It is a rule of thumb with no official source: it isn't in WCAG or in Google's guidance. It's still a sensible ceiling: long alt text is tiring to listen to, and a chart that needs a paragraph belongs in the page text instead.
Alt text vs file name, caption and title
| Field | Who uses it | What to put there |
|---|---|---|
| Alt text | Screen readers, Google | What the image shows or does |
| File name | Google, as "very light clues" | Short words with hyphens: water-heater-install.jpg, not IMG00023.JPG |
| Caption | Everyone who sees the page | Extra context; don't repeat the alt text word for word |
| Title attribute | Hardly anyone | Optional; WordPress notes many devices and browsers don't show it |
The file name quote is Google's (Google Search Central: Image SEO best practices). One more Google detail: it can't read images placed with CSS, the code that styles a page, so a photo used as a section background is invisible to image search.
Where to add alt text in WordPress, Wix and Squarespace
| Platform | Where the field is | Watch out for |
|---|---|---|
| WordPress | Image block settings, "Alternative text," with a "Mark as decorative" box. Or Media Library for the default | Alt text set in the block applies to that page only; the Media Library sets the default for future use (WordPress.org: Image block) |
| Wix | Image settings, or the Accessibility Wizard, which can generate alt text with AI | Wix: "We cannot guarantee that AI generated alt text is always completely accurate." It skips SVG and GIF files |
| Squarespace | Image block, Content tab, "Image alt text." The SEO report lists images missing it | If you add nothing, the file name usually becomes the alt text. Section backgrounds can't take alt text |
AI-written alt text is a decent first draft for a big photo library. It can't know that the photo shows your Elm Street office or a job in Tucson, so read and fix each one.
How to find images missing alt text
- Chrome's Lighthouse. Open your page in Chrome, right-click, Inspect, then the Lighthouse tab, and run an accessibility check. The audit "Image elements have [alt] attributes" flags images with no alt attribute (Chrome for Developers: Lighthouse accessibility scoring). It checks only that the attribute is there, not whether the words are any good.
- Your website builder's own report: Squarespace's SEO report or Wix's Accessibility Wizard.
- Spot-check by ear. Turn on VoiceOver (Mac, iPhone) or Narrator (Windows) and listen to one key page. Gibberish file names and "logo logo logo" stand out fast.
Start with the pages that bring in work: home, each service page, contact. Old blog images can wait.
Example
A plumber with 40 job photos
All 40 photos have alt text like "plumber Phoenix plumbing services." The owner rewrites each to say what's in it ("Repiping a 1970s home with PEX," "Leak under a kitchen sink before repair"), renames the newest files the same way, and leaves the decorative wave graphic empty. About two hours of work, done once.
A dental office's specials banner
The homepage banner is one image reading "New patient exam and cleaning, $99." Google and screen readers see nothing unless the alt text repeats that offer. The office types the offer as real text on the banner instead, and gives the background photo empty alt text.
FAQ
Is alt text the same as an alt tag?
People say "alt tag," but it's the alt attribute of the image tag. Same thing, same field in your website builder.
Should every image have alt text?
Every image needs an alt attribute. Leave it empty (alt="") for decoration and for images the text beside them already describes, per the W3C.
Do keywords in alt text help ranking?
They help Google understand the image when they describe it truthfully. Google warns that stuffing keywords "may cause your site to be seen as spam."
Does missing alt text break ADA rules?
Alt text is part of WCAG, the standard usually used to judge website accessibility. Whether and how the law applies to your site is covered in our ADA website compliance guide.
Different for you?
- You want every on-page element, not just images: see on-page SEO for service pages.
- You got an accessibility demand letter, or serve Ontario customers: see ADA website compliance, which also covers Ontario's AODA.
- Your photos make pages slow: see Core Web Vitals and website speed.
- Your builder makes alt text hard to manage: see Wix, Squarespace or WordPress for SEO.
- You'd rather have someone fix your site's images and pages: see the Website agent.