Alt text

Alt text, short for alternative text, is an HTML attribute applied to image tags that describes the image's appearance and function. Search engine crawlers cannot parse visual pixels directly, so they rely on alt text alongside surrounding copy to understand image contents and index them accurately for search.

In plain English

Alternative text is an HTML attribute that provides a textual description of an image on a webpage. When a web page loads, images are rendered visually. However, if a visitor experiences a slow network connection, uses a text-only browser, or uses a screen reader due to visual impairment, the browser reads the alt text aloud or displays it in place of the missing graphic. This makes alt text a fundamental accessibility requirement for modern web development.

For search engine crawlers, alt text functions as an authoritative translation of visual media into indexable text. While modern machine learning models can recognize general objects inside images, automated search bots rely heavily on explicit markup to understand precise context. Alt text explicitly tells the crawler what an image depicts, how it relates to the surrounding topic, and which search queries it can satisfy in web and image search results.

An example

Consider an e-commerce website selling ergonomic office furniture. On a product landing page for an adjustable standing desk, the publisher includes several detailed photographs.

A poor implementation uses either empty attributes or keyword-stuffed strings that harm accessibility:

html
<!-- Poor: Uninformative keyword stuffing -->
<img src="desk.jpg" alt="standing desk buy standing desk best price cheap standing desk" />

A well-crafted implementation describes the specific subject matter and function clearly:

html
<!-- Good: Descriptive, natural, and helpful -->
<img src="motorized-standing-desk-bamboo.jpg" alt="Dual-motor electric standing desk with natural bamboo top raised to standing height in a home office" />

When search engine crawlers parse this HTML, they process the image description in several ways:

  1. Topical context: The words “dual-motor electric standing desk” confirm the commercial subject matter of the page and reinforce the primary document theme.
  2. Image search indexing: The image becomes eligible to rank for specific long-tail visual searches, such as queries for bamboo standing desk setups.
  3. Link anchor behavior: If the image is wrapped inside a clickable hyperlink pointing to a warranty guide, the alt text automatically serves as the link’s anchor text, providing context for the destination document.

Why it matters

Alt text directly influences both web accessibility and search engine visibility. Search engines use image descriptions to extract entities, understand the visual components of a page, and power rich search results like image carousels and product cards. Failing to supply descriptive alt text blinds search crawlers to your media assets, misses high-intent image search traffic, and creates unnecessary usability hurdles for visitors with disabilities.

Read the full guide to technical SEO, or explore our complete guide to image alt text.