Missing alt text is one of the most common yet easily fixable issues in web development and SEO. The `alt` attribute, or alternative text, is the text description of an image that is read aloud by screen readers, displayed when an image fails to load, and used by search engines to understand visual content. An image with a missing or empty alt attribute is invisible to visually impaired users and a black box to search engine crawlers.

Think of alt text as the label next to a painting in a gallery. It tells you what you’re looking at and provides important context. Without it, you’re just looking at a picture with no explanation. For search engines and users with screen readers, an image without alt text is a silent, empty frame. For a broader look at image optimization, see our guide on the images category.

An illustration of an image with a blank, empty alt text tag.

The Triple Purpose of Alt Text

Writing good alt text is about serving three critical functions simultaneously. As the W3C Web Accessibility Initiative makes clear, this is a fundamental part of web standards.

  • Accessibility: This is the primary purpose. The alt text should be a concise and accurate description of the image’s content and function for users who cannot see it.
  • Image SEO: Alt text is a strong signal to Google about the subject matter of an image, which helps it rank in Google Image Search and contributes to the page’s overall relevance.
  • Broken Image Context: If an image fails to load due to a network error or broken link, the browser will display the alt text in its place, preserving the meaning and context for all users.

A Step-by-Step Guide to Writing and Fixing Alt Text

The goal is to ensure that every meaningful image on your site has a descriptive alt attribute. For a deep dive into this topic, this guide from Moz on alt text is an excellent resource.

  1. Crawl Your Site: Use an SEO audit tool like Creeper to perform a full crawl. The tool will identify every image on your site and flag any that have a missing or empty `alt` attribute.
  2. Prioritize Important Images: Start with the images that are most critical to understanding your content, such as product photos, diagrams, and infographics.
  3. Write Descriptive and Concise Text: Describe what is in the image as if you were explaining it to someone over the phone. Be specific, but keep it under 125 characters. See our guide on alt text length.
    • Image Example: A golden retriever leaping to catch a red frisbee in a sunny park.
    • Bad: alt="dog"
    • Okay: alt="dog catching frisbee"
    • Good: alt="Golden retriever leaping to catch a red frisbee in a sunny park"
  4. Use Keywords Naturally: If your target keyword is relevant to the image (e.g., the product name), include it. Do not force keywords where they don’t belong.
  5. Handle Decorative Images Correctly: For images that are purely for decoration (e.g., background patterns, spacers), use an empty alt attribute (alt="") to signal to screen readers that they can be safely ignored. Don’t just leave the attribute off, as this is an error. See our guide on missing alt attributes.

Frequently Asked Questions

What is the difference between alt text and a caption?

Alt text is a direct replacement for the image for users who cannot see it and is a key signal for search engines. A caption is additional information that is visible to all users. If an image has a detailed caption, the alt text can be more concise, but it should not be left empty.

What’s the difference between alt text and an image file name?

Alt text is an HTML attribute that describes the image for accessibility and SEO. An image file name (e.g., ‘golden-retriever-frisbee.jpg’) is the name of the actual file. While descriptive file names are a good practice for SEO, they are not a substitute for alt text.

Should I put my keywords in the alt text?

Yes, but only if it is natural and descriptive of the image. The primary purpose of alt text is to describe the image for accessibility. If your target keyword accurately describes the image, you should include it. Do not engage in ‘keyword stuffing’ by forcing irrelevant keywords into the alt text.

How can I find all the images with missing alt text on my site?

The most effective way is to use a website crawler like Creeper. It will scan every page on your site and provide a report of all images, specifically flagging any that have a missing or empty alt attribute.

Are your images speaking to everyone? Start your Creeper audit today to find and fix all images with missing alt text.