Skip to content
ImgPress.online
SEO images

How to Write Alt Text: A Guide With Real Examples

Alt text is a short description that stands in for an image when someone can't see it. Here's how to write it well, with examples you can copy.

ImgPress EditorialPublished Updated 7 min read
Share:
Illustration for How to Write Alt Text: A Guide With Real Examples
On this page

Alt text (the alt attribute on an image) is a short written description that takes the image's place when someone can't see it. A screen reader reads it aloud. A browser shows it when the image fails to load. Search engines use it to understand what the picture shows.

People often treat it as an SEO checkbox, but its real purpose is accessibility. Write it for a person who can't see the image, and you'll almost always end up with alt text that serves search engines well too.

Who actually relies on alt text?

Blind and low-vision people using screen readers are the main audience. When a screen reader reaches an image, it announces something like "image" and then reads the alt text. If there isn't any, many screen readers fall back to reading the file name aloud. Imagine hearing "IMG underscore 4 8 2 1 dot JPG" in the middle of an article.

Alt text also helps:

  • People on slow or unreliable connections whose images don't load
  • People who turn images off to save data
  • Search engines, which use alt text alongside page content to understand images
  • Some browser and assistive tools that summarize or translate pages

Accessibility standards such as WCAG require text alternatives for meaningful images, and in many places accessibility requirements apply to public sector and commercial websites alike.

How do you write good alt text?

Ask one question: if this image disappeared, what would someone need to know to get the same information from the page?

That answer is your alt text. A few principles help you get there.

Describe the purpose, not just the pixels. The same photo can need different alt text depending on where it appears. A photo of a woman holding a coffee mug might be "Customer holding the blue speckled mug" on a product page and "Maya Ortiz, our head roaster, in the tasting room" on an About page.

Be specific. "Dog" is less useful than "Golden retriever catching a frisbee on a beach."

Front-load the important part. Screen reader users often skim. Put the key information first.

Skip "image of." The screen reader already says it's an image. Only mention the medium when it matters: "Watercolor painting of...", "Screenshot of...", "Bar chart showing..."

Include text that appears in the image. If a graphic says "50% off this weekend," the alt text needs to say that too. If you've got a lot of text in an image, pull it out with Image to Text and consider putting it in the page as real text instead.

Use normal punctuation. End with a period. It gives screen readers a natural pause.

Good vs bad alt text examples

Image Bad alt text Better alt text
Product photo of running shoes shoes Red trail running shoes with a chunky black sole, side view
Team member headshot photo Daniel Reyes, head of customer support
Recipe hero shot food food recipe dinner easy recipe Bowl of creamy tomato pasta topped with fresh basil
Screenshot in a tutorial screenshot Settings page with the "Export as PDF" option highlighted
Logo linking to the homepage logo Brightside Coffee home
Chart in a report chart Line chart: website visits rose steadily from January to June
Meme in a blog post funny meme Cat staring at a laptop, captioned "When the code works on the first try"
Decorative wave divider wave divider graphic "" (empty alt)

Notice the logo row. When an image is a link, the alt text should describe where the link goes or what it does, not what the image looks like.

When should alt text be empty?

When an image is purely decorative and adds no information, use an empty alt attribute: alt="". That tells screen readers to skip it entirely.

Typical decorative images:

  • Background textures and patterns
  • Divider lines and flourishes
  • Icons right next to text that says the same thing (a phone icon next to "Call us")
  • Stock photos used purely for visual mood, where they add nothing to the content

Don't confuse an empty alt with a missing one. alt="" is a deliberate signal. No alt at all is an omission, and screen readers handle it badly.

Note: If you're unsure whether an image is decorative, imagine removing it. If the page loses no information, it's decorative. If something is missing, it needs alt text.

How long should alt text be?

Short enough to be easy to listen to, long enough to be useful. Most good alt text is a phrase or a single sentence.

You'll often see 125 characters cited as a limit. That isn't an official rule; it's a practical guideline that grew out of how some older screen readers handled long alt text. It's still a sensible target, because long alt text is tiring to listen to and can't be paused or navigated as easily as normal text.

When an image genuinely needs more explanation, like a detailed chart, a diagram or an infographic, use a two-part approach:

  1. Short alt text that identifies the image and its main point: Bar chart comparing monthly sales for 2025 and 2026.
  2. The full detail in a caption, a nearby paragraph, or a data table on the page.

That way everyone, sighted or not, gets access to the full information.

How do you handle charts, screenshots and infographics?

These are where alt text gets tricky, because they carry a lot of information.

Charts: state the type of chart and the key takeaway, not every data point. "Line chart: support tickets fell by about a third after the new help center launched in March." If readers need exact numbers, provide a table.

Screenshots: describe what the reader should notice in context. In a tutorial, that's usually the specific button, setting or message the step refers to.

Infographics: a short alt describing the topic, plus the full content as text on the page. A text version also helps search engines, which can't reliably read every word baked into a graphic.

Images of text (quotes, banners, social graphics): the alt text should include the text itself, word for word if it's short.

What are the most common alt text mistakes?

  • Keyword stuffing. alt="cheap shoes buy shoes online best running shoes" is useless to a screen reader user, and Google explicitly advises against it.
  • Using the file name. alt="DSC_0042.jpg" happens a lot with automated uploads.
  • Repeating the caption. If a visible caption already describes the image, the alt text can be shorter or focus on what the caption doesn't cover, so screen reader users don't hear the same thing twice.
  • Describing decorative images. Every unnecessary "decorative swirl" slows down a screen reader user.
  • Leaving out text that's in the image. Promo banners are the worst offenders.
  • Relying on automatic alt text without checking it. Some platforms and AI tools generate descriptions. They can be a starting point, but they miss context and sometimes get things plainly wrong. Always review them.

Tip: Test your page with a screen reader once. VoiceOver is built into Macs and iPhones, Narrator into Windows and TalkBack into Android. Five minutes of listening teaches more about alt text than any guide.

Where do you add alt text?

It depends on your tools:

  • HTML: <img src="mug.webp" alt="Blue speckled ceramic mug on a wooden table">
  • WordPress and most CMSs: an "Alternative text" field in the media library or image block
  • Social media: Instagram, X, LinkedIn, Facebook and others have an "Add alt text" option when posting. It's often tucked away in the advanced or edit settings, so look for it.
  • Documents and slides: word processors and presentation apps let you right-click an image to add alt text, which carries over into exported PDFs.

Alt text lives in your page or post, not inside the image file. Image files have their own metadata fields (you can inspect them with the Image Metadata Viewer), but browsers and screen readers don't use those as alt text.

Alt text is one part of a wider set of image habits. For file names, sizes, formats and lazy loading, see our guide on how to optimize images for SEO. And because accessible pages are also fast ones, it's worth compressing your images before they go live.

Written by ImgPress Editorial

Our editorial team writes and maintains practical guides on working with images. Articles are reviewed for accuracy and updated when tools or best practices change. Spotted an error? Let us know.

Questions readers ask

How long should alt text be?

There is no strict limit, but most good alt text is a short phrase or a single sentence, often under about 125 characters. If an image needs a longer explanation, such as a complex chart, put the details in a caption or nearby text and keep the alt text brief.

Should alt text start with 'image of' or 'picture of'?

Usually not. Screen readers already announce that the element is an image, so 'image of' just repeats information. The exception is when the medium matters, such as a painting, illustration or screenshot.

Is a missing alt attribute the same as alt=""?

No. An empty alt attribute tells assistive technology the image is decorative and can be skipped. A missing alt attribute leaves the screen reader guessing, and many will read out the file name instead, which is rarely helpful.