Nightcrop
LoginGet started

What Is Alt Text? How to Write It for SEO and Access

Nightcrop · November 23, 2026

Alt text is the alt attribute on an image tag: a short written description of the image. Screen readers read it aloud, browsers show it when an image fails to load, and Google uses it, along with computer vision and the page content, to understand what the image shows.

What does alt text look like in HTML?

It is an attribute on the img element:

<img src="dalmatian-puppy-fetch.jpg" alt="Dalmatian puppy playing fetch">

An attribute is extra information attached to an HTML tag. Here, src says where the image file is and alt says what it shows. If the image cannot be seen, the alt text stands in for it.

Why does alt text matter for SEO?

Google's image guidance calls alt text "the most important attribute when it comes to providing more metadata for an image." It says Google uses alt text along with computer vision algorithms and the contents of the page to understand the image. That matters for image search, and it gives Google context for the surrounding page.

There is a second role. If an image is a link, Google says the alt text is useful as the anchor text, which is the clickable text of a link. An icon that links to your pricing page and has no alt text gives that link no label at all. Our guide to internal linking explains why link labels matter.

Alt text is also an accessibility requirement in practice. A person using a screen reader depends on it to know what the image adds. Writing it for them is the right default, and the search benefit follows.

How do you decide what to write?

The W3C's alt text decision tree asks what job the image does on the page. The answer changes what you write.

Image typeWhat to writeExample
Informative photo or graphicA brief description of what mattersalt="Team celebrating the product launch"
Functional (a button or link)The action or destination, not the picturealt="Search" on a magnifying-glass icon
Image of textThe same text, if it appears nowhere elsealt="Summer Sale"
Complex chartA short alt, with the full data in a table nearbyalt="Quarterly sales chart"
DecorativeEmpty altalt=""

The examples are illustrative. The pattern to remember is the empty case. An empty alt="" tells screen readers to skip a purely decorative image, which is better than a made-up description. It is different from leaving the attribute off, which Google's documentation marks as a bad example.

What mistakes should you avoid?

What else helps an image get understood?

Google recommends short, descriptive file names. It says my-new-black-kitten.jpg is better than IMG00023.JPG and suggests avoiding generic names like image1.jpg. It also lists the formats Search supports in the image tag: BMP, GIF, JPEG, PNG, WebP, SVG and AVIF, and suggests the file extension match the file type.

Images also affect speed. A large hero image is often the slowest element on the page, which is the subject of how to improve LCP, and images without set dimensions can shift the layout, covered in cumulative layout shift.

How do you audit alt text on a site?

  1. Crawl your pages with any SEO crawler and export every image with its alt value.
  2. Sort for empty and missing values. Decide for each whether it is decorative or needs a description.
  3. Fix the images that carry meaning first: product photos, diagrams, and images inside links.
  4. Add the check to your publishing routine so new posts do not repeat the gap.

Our SEO audit checklist shows where this check fits in a wider review.

Frequently Asked Questions

How long should alt text be?

Keep it as short as the image allows. One clear phrase is usually enough, and a chart needs its detail in the page text rather than in the attribute.

Do I need alt text on every image?

Every image tag should have the attribute. Decorative images get an empty value, and meaningful images get a description.

Is alt text the same as a title attribute or caption?

No. Alt text replaces the image for people and software that cannot see it. A caption is visible text for everyone, and a title attribute is an optional tooltip.

Should I put my target keyword in every alt text?

No. Google warns against stuffing keywords into alt attributes. Use the keyword only where it honestly describes the image.

Does alt text help AI search?

Any system that reads your HTML but does not view images has only the alt text and surrounding copy to go on. Treat it as a description, and do not count on a specific effect.