pictuary

← Glossary

web performance and seo

Alt text

A text description in HTML that makes images accessible to screen readers and search engines.

What is Alt text?

Alt text is a short written description of an image embedded in the HTML `alt` attribute that provides context for both screen readers and search engines. When a screen reader encounters an image, it reads the alt text aloud to visually impaired users, while Google uses alt text alongside computer vision to understand and rank images in search results.

Importance of Alt text

Alt text for images is essential for both web accessibility compliance and image SEO performance on your optimized photos. Without proper alt text, screen readers announce only "image" or read raw filenames like "IMG_4523.JPEG," creating a poor user experience, while search engines struggle to understand your visual content and rank it appropriately in Google Images.

Alt text in Practice

An e-commerce site selling running shoes uploads a compressed product image at 800×600 pixels for web display. Adding `alt="black Nike Air Max running shoes with white sole"` allows screen readers to describe the product meaningfully while helping Google understand the image content for search ranking. Sites with descriptive alt text on product images are cited 3–6 times more frequently in AI search responses compared to pages with missing or generic descriptions.

Alt text Best Practices

  • → Write descriptive alt text between 80-125 characters to avoid screen reader truncation.
  • → Include one relevant keyword naturally without stuffing or repetition.
  • → Skip phrases like "image of" or "photo of" since screen readers announce "graphic" automatically.
  • → Use empty alt attributes (`alt=""`) for purely decorative images to tell assistive technology to skip them.

Example of Alt text

A travel blog uploads a compressed landscape photo for their article about Yosemite. Instead of generic alt text like `alt="mountain photo"`, they write `alt="Half Dome granite cliff rising above Yosemite Valley at sunset"`. This 67-character description provides meaningful context for screen readers while including the naturally relevant keyword "Yosemite Valley" for search engines.

Related Terms

Image SEOLCP (Largest Contentful Paint)Image optimizationEXIF dataLazy loadingAbove the foldPixel dimensions

Frequently Asked Questions

What is alt text and why is it important?

Alt text is a description of an image written in HTML code that screen readers use to describe images to visually impaired users. It's important because it ensures web accessibility compliance, helps search engines understand your images for better SEO rankings, and is required by laws like the European Accessibility Act. Google specifically states that alt text is the most important image metadata for search optimization.

How do you write good alt text for images?

Good alt text describes the image content clearly in 80-125 characters without using phrases like "image of" since screen readers already announce "graphic." Focus on what's actually visible in the image, include one relevant keyword naturally, and avoid keyword stuffing which Google treats as spam. For decorative images, use empty alt attributes instead of descriptions.

What happens if my images don't have alt text?

Images without alt text create accessibility barriers since screen readers will either skip the image entirely or read the filename aloud, like "IMG underscore 4523 dot JPEG." Search engines also struggle to understand and rank your images properly, reducing your visibility in Google Images which drives about 22% of all web searches. Additionally, you may face legal compliance issues under accessibility laws like the European Accessibility Act.