gaash.ai

Alt Text

Alt text is the short written description you attach to an image in your HTML, in the alt attribute of the <img> tag. Screen readers speak it aloud for people who can't see the image, browsers show it if the image fails to load, and it gives search engines and AI systems a text description of visual content they otherwise can't fully interpret on their own.

Why alt text matters for AI visibility

Text is still the primary channel AI systems use to understand a page, even as models get better at reading images directly. A well-written alt text tells a crawler or an assistant what a product photo, chart, or diagram actually shows, without it having to guess. That matters most for images carrying information you haven't repeated anywhere else on the page: a diagram explaining a process, a chart with a specific number, a product shot showing a feature the body copy never mentions. Leave the alt attribute empty or filled with a filename, and that content is invisible to anything that reads code rather than pixels. It's a small, low-effort fix, but it's also one of the few accessibility requirements that happens to double as a machine-readability signal, so there's no real trade-off in doing it properly.

How alt text works technically

The alt text lives in the alt attribute of the image element: alt="description of the image". It's part of the HTML standard, and every browser, screen reader, and crawler reads it the same way. Write it as a factual, one-or-two-sentence summary of what the image shows, in context. A photo of a coffee cup needs a different description on a café's menu page than it does in an article about porcelain glazing. Images that are purely decorative and add no information get an empty alt attribute (alt=""), which tells screen readers to skip them entirely rather than reading out something meaningless.

Common mistakes

The most common mistake is simply leaving the attribute out, followed by filling it with something useless like "image" or the raw filename, e.g. "IMG_4823.jpg". Neither helps a person or a machine. Keyword stuffing — cramming in search terms the image doesn't actually depict — is nearly as common and reads as manipulative rather than helpful. The opposite problem shows up too: descriptions so long or so detached from context that they stop being usable, or that open with "image of," which is redundant since screen readers already announce that an image is coming. A useful test: would this description actually help someone who can't see the image?

Relevance to AI recommendations

When an assistant like ChatGPT, Perplexity, or Gemini pulls together an answer, it's working from the text signals available on your page, and alt text is one of them. It's not a special AI-only tag — Google has been explicit that AI Overviews and AI Mode don't require separate markup written "for AI," alt text just does its normal accessibility job and gets read the same way it always has. Multimodal models that can look at an image directly still tend to use the alt text as a cross-check against their own reading of the pixels, so a mismatched or absent description doesn't help you there either. None of this replaces having something worth citing in the first place, but for pages that already do, alt text closes a gap that a lot of competitors leave open by default.

Example

A bicycle shop lists a photo of a red city bike with a front basket. Poor alt text: "bike-new-2024.jpg". Better alt text: "Red city bike with a woven wicker basket and coaster brake, side view." The second version tells both a person and a machine exactly what's in the frame. Someone searching for a city bike with a basket gives the search engine something concrete to match against; someone asking an assistant for a practical commuter bike gives it a product detail to reason about. The cost is one accurate sentence per image, not a project.

Common questions

How long should an alt text be?

One or two short sentences, typically under about 125 characters, is the usual guidance. Describe the essentials precisely — too short says nothing useful, too long buries the point and gets read out awkwardly by screen readers.

Do all images need alt text?

All images that carry information do. Purely decorative images that add nothing should get an empty alt attribute (alt=""), so screen readers skip past them instead of reading out noise.

Related terms