Products SEO & GEO Agent Paid Ads Agent Website Agent Conversion Agent
How it works Pricing FAQ Blog Book a call

Alt text for SEO: how to write it, with examples

Updated · 8 min read

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 call

How 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.

  1. Say what matters in the picture. The subject, the action, and the detail that makes it yours (the place, the result, the person).
  2. Keep it short. A few words, sometimes one sentence.
  3. 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.
  4. 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).
  5. 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.
  6. Links and buttons describe the action, not the picture.
  7. Decoration gets empty alt text (alt=""), so screen readers skip it.
Image on a service pageWeakBetter
Plumber's job photoplumber plumbing Tucson best plumberTechnician installing a tankless water heater in a garage
Dentist's before-and-afterimage of teethFront teeth before and after porcelain veneers
Salon portfoliohairBalayage on shoulder-length brown hair
Accountant's team photophoto of teamOur four tax preparers at the front desk of the Elm Street office
Logo linking to home pagelogoSmith 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 isWhat to writeExample
A photo or graphic that adds meaningA brief description of that meaning"Roofer replacing shingles after hail damage"
A link or button with no text beside itWhere it goes or what it doesLogo: "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 mapA 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 itEmpty: 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

FieldWho uses itWhat to put there
Alt textScreen readers, GoogleWhat the image shows or does
File nameGoogle, as "very light clues"Short words with hyphens: water-heater-install.jpg, not IMG00023.JPG
CaptionEveryone who sees the pageExtra context; don't repeat the alt text word for word
Title attributeHardly anyoneOptional; 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

PlatformWhere the field isWatch out for
WordPressImage block settings, "Alternative text," with a "Mark as decorative" box. Or Media Library for the defaultAlt text set in the block applies to that page only; the Media Library sets the default for future use (WordPress.org: Image block)
WixImage settings, or the Accessibility Wizard, which can generate alt text with AIWix: "We cannot guarantee that AI generated alt text is always completely accurate." It skips SVG and GIF files
SquarespaceImage block, Content tab, "Image alt text." The SEO report lists images missing itIf 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?

Keep learning

NextAI image optimization tools: compress, tag and resizeWhich AI image tools a small business site needs to shrink files, write alt text and resize photos, what they cost, and the free options that do the same job.

Do it yourself

On-page SEO checklist: every item to check before publishingA pre-publish on-page SEO checklist for one new page: content, title, headings, URL, images, links, indexing, mobile and speed, plus what to do after launch.

Ask us one question

One line is enough. We reply by email.

Sources

  1. Google Search Central: Image SEO best practices
  2. Google Search Central: Understanding page experience
  3. W3C WAI: An alt decision tree
  4. W3C WAI: Images tutorial
  5. W3C WAI: Functional images
  6. W3C: Understanding Success Criterion 1.1.1 Non-text Content
  7. WebAIM: Alternative Text
  8. Chrome for Developers: Lighthouse accessibility scoring
  9. WordPress.org Documentation: Image block
  10. Wix Help Center: Accessibility: Preparing your images and galleries
  11. Squarespace Help Center: Add alt text to images for accessibility and SEO