What Is Alt Text?
Updated 16 September 2026
Jump to section
Alt text is the written description you attach to an image in a page's HTML, using the alt attribute. It does three jobs. Screen readers read it aloud to blind users, browsers display it when an image fails to load, and Google uses it to understand what the image shows. Web accessibility standards require it under WCAG success criterion 1.1.1.
What is alt text for?
Alt text exists first for accessibility, and search value follows from that. A screen reader cannot see a photo, so it reads the alt text instead, which is how a blind user learns what the image contains.
The international accessibility standard makes this a requirement. WCAG asks that all non-text content has a text alternative that serves the equivalent purpose (W3C, success criterion 1.1.1, Level A). An image of your price list needs alt text that carries the same information the image does.
Alt text is one of several image text fields, and they are easy to confuse:
| Field | Where it lives | Who it serves |
|---|---|---|
Alt text (alt) |
In the HTML | Screen readers, search engines, and the fallback when an image fails |
| Caption | Visible under the image | Every sighted reader |
| Title attribute | Hover tooltip | Minor, often ignored by browsers |
| File name | The image URL | A small hint to search engines |
How does alt text help SEO?
Alt text tells search engines what an image is about, which is how it earns a place in image search. Google states that it uses alt text along with computer vision algorithms and the contents of the page to understand the subject matter of the image (Google Search Central).
That matters for two reasons. Google Images is a real source of traffic for products, recipes, and visual services. The same reading also feeds how your page is understood overall, including by the AI systems behind answer engines.
Alt text is a supporting signal, not a shortcut. It helps Google index and interpret an image correctly, and it can support image rich results alongside schema markup. It will not lift a weak page on its own.
How do you write good alt text?
Good alt text describes the image plainly, in the context of the page. Google's image guidance is to focus on useful, information-rich content that uses keywords appropriately and in context, not to stuff the attribute.
A worked example makes the difference clear. Picture a photo of a nasi lemak set on a KL restaurant's menu page.
- Weak:
alt="food kl best restaurant halal nasi lemak delivery murah" - Stuffed with keywords, describes nothing real.
- Good:
alt="Plate of nasi lemak with fried chicken, sambal, peanuts, and a boiled egg" - Describes the actual image, in words a person would use.
(An illustrative example, not a client result.) The same Google guidance warns that filling alt attributes with keywords reads as spam and creates a poor user experience. Write what you would say if you were describing the photo to someone who cannot see it.
When should alt text be empty?
Purely decorative images should carry an empty alt attribute, written as alt="". A border, a background flourish, or a spacer graphic adds nothing a screen reader needs to announce, and an empty alt tells assistive technology to skip it silently.
The test is simple. If the image carries information, describe it. If removing the image would lose nothing for the reader, give it an empty alt so it does not clutter the experience for screen-reader users.
We think alt text is the field most often left blank on client-updated sites, usually because the upload form makes it optional and nobody notices it is missing.
Frequently asked questions
Is alt text a Google ranking factor?
Not a major one for normal page rankings, but it is how Google understands and ranks images. Alt text is the main text signal for image search, and it helps Google read what a page is about. It will not rescue a thin page, and it is not a place to hide keywords. But leaving it blank throws away a free, accurate signal that costs nothing to add.
What is the difference between alt text and a caption?
Alt text lives in the code and is read by screen readers and search engines; a caption is visible text printed under the image for everyone. They can say different things. A caption might credit a photographer, while the alt text describes what the photo actually shows. Sighted users see captions, while the alt text serves those who cannot see the image and the crawlers reading the page.
How long should alt text be?
Long enough to convey the image, short enough to stay useful, usually a sentence or less. Aim to describe the content and its purpose on the page, not every visible detail. If an image genuinely needs a paragraph to explain, that explanation belongs in the page text, with shorter alt text summarizing the picture for anyone who cannot see it.
Do decorative images need alt text?
They need an empty alt attribute, alt="", rather than a description. This tells screen readers to skip the image, which is the correct behavior for something purely decorative. Leaving the attribute off entirely is different and worse, because some screen readers then read out the raw file name instead, which helps nobody.
Does alt text help accessibility as well as SEO?
Yes, and accessibility is its original purpose. Alt text is a core requirement of the WCAG standard that many organizations and public bodies follow, so it serves visually impaired visitors directly. The search benefit is a useful side effect of doing the accessibility work properly, rather than the other way around.
Should I put my keywords in alt text?
Only where they describe the image naturally. If the photo genuinely shows the thing you want to rank for, naming it is correct and helpful. Cramming in extra keywords the image does not show is the mistake Google warns against. It can get the page flagged as spam, so describe the image honestly instead.
Describe every image like someone cannot see it
Storming Solutions builds websites and runs SEO, AEO, and GEO for Malaysian businesses from Kuala Lumpur. Getting image details right sits inside both the accessibility pass and the on-page SEO pass we run before launch, alongside the title tags and meta descriptions. We think a site that describes its images well is easier for every visitor and every engine to read.
Wondering whether your images are working as hard as your words? Message us on WhatsApp or start with the SEO in Malaysia pillar. Our SEO, AEO, and GEO work covers the on-page details that decide how clearly Google reads a page.