What is alt text, and how do I write it?

Alt text is a short written description of an image. Screen readers read it aloud, browsers show it if the image fails to load, and Google uses it to understand the picture. Describe what the image adds to the page in a sentence or less. Purely decorative images get an empty alt attribute so screen readers skip them.

The short version

  • Ask why the image is on this page, then describe that in a sentence or less.
  • Include any words that appear in the image.
  • Skip “image of.” Screen readers already say it’s an image.
  • Decorative images get an empty alt attribute (alt="").
  • No keyword stuffing and no file names.

How do I write good alt text?

Describe what matters here. The same photo can need different alt text on different pages. A team photo on the About page is about who works there. The same photo in a hiring post might be about the workplace.

Keep it short. One sentence is usually enough. Longer detail belongs in a caption or the page text.

Include text in the image. Hours, prices or a slogan in a graphic must be in the alt text too.

Examples:

  • A bakery’s About page: “The four bakers outside the shop’s front door.”
  • A product: “Red cedar raised garden bed, 4 by 8 feet, filled with vegetables.”
  • A roofer’s before and after: “Roof with missing shingles before repair” and “Same roof with new gray shingles.”
  • A logo that links home: the business name, plus “home.”

In WordPress: open the Media Library, select the image and fill in the Alternative Text field. You can also set it in the image block’s settings while editing a page.

Why does it matter?

For someone who can’t see the image, the alt text is the image. Missing alt text can hide a product, a location or the point of a page.

It’s one of the basics in the WCAG accessibility guidelines. Search uses it too. Google’s image SEO guidance calls alt text “the most important attribute” for giving more information about an image.

When should alt text be empty?

Decorative images, such as background patterns, dividers or a photo that adds nothing to the text, should have alt="". The W3C’s decorative images tutorial explains this lets screen readers ignore them.

Don’t leave the attribute out entirely. The same tutorial notes some screen readers then announce the file name instead. The W3C’s alt decision tree helps with harder cases.

What are the common mistakes?

  • The file name as alt text, like “IMG_4021.jpg.”
  • Keyword stuffing, like “plumber plumbing Somerset PA plumber.” Google warns this can be seen as spam.
  • The same alt text on every image.
  • A paragraph of description where a caption would serve better.
  • Describing a linked image’s look instead of where it goes. For a linked logo or button, say the destination.

What if a checker still flags my images?

Accessibility checkers often flag images with no alt attribute at all. Open the page in the editor, find each flagged image and add a description or mark it decorative. Some themes add images, like backgrounds or icons, that you can’t edit in the page. Those need a fix in the theme. Automated tools catch only part of the picture. See whether accessibility overlays make a site compliant.

How much does it cost, and how long does it take?

Adding alt text is free. Writing it takes a minute or two per image. A small site can be done in an afternoon.

How does E-3 handle this?

When you send new images for a page, add a line on what each one shows, and a person at E-3 makes the change. This isn’t legal advice. For the bigger picture, read whether your site needs to be ADA accessible.

Common questions

Should I put keywords in alt text?
Only where they describe the image naturally. Google advises against filling alt text with keywords, and it makes the page worse for screen reader users.
Does every image need alt text?
Every image needs an alt attribute. Meaningful images need a description. Decorative images need an empty one, so screen readers skip them.
What if the image contains words?
Include those words in the alt text. If a graphic says "Open Saturdays 9 to 1," the alt text should say it too.

Rather talk it through?

Call our team, or send a note and we’ll reply within one business day. No pressure and no jargon.

Ask E-3

Suggestions appear as you type. Use the up and down arrows to choose one, or press Enter to ask.

Get support