Alt text

Alternative text

Alt text is a short written description of an image, stored in the image's alt attribute, that screen readers read aloud and search engines use to understand the picture.

Checked 27/11/2026 against 3 sources. Next review 27/05/2027.

Alt text is the text you put in the alt attribute of an image tag. It does two jobs. It lets people who cannot see the image, such as screen reader users or people on a slow connection, get the same information [1]. It also helps Google work out what the image shows, together with the page around it [1]. Alt text is part of accessibility and of WCAG. For a small shop, the work is mostly writing one honest sentence per product or team photo.

How do I write good alt text for a product photo?

Google says to write useful, information-rich text that fits the content of the page, and to use keywords naturally [1]. W3C says an informative image needs at least a short description of the essential information it carries [3]. So say what a person would see, in plain words.

Alt textGoogle's labelWhy
(no alt attribute)Bad [1]Nothing is described
puppy dog baby dog pup pups puppies doggies cheap dogfoodBad, keyword stuffing [1]Reads as spam
puppyBetter [1]True but thin
Dalmatian puppy playing fetchBest [1]Says what is happening

The table uses Google's own puppy example [1]. For a shop, the same idea turns a vague file into a useful line.

A Singapore florist example

Say you sell bouquets and the photo shows white roses wrapped in brown paper. Weak alt: "flowers". Stuffed alt: "flowers Singapore cheap bouquet delivery florist roses". Useful alt: "White rose bouquet wrapped in brown paper". The third one describes the photo and leaves the selling to the page text.

When should I leave the alt attribute empty?

W3C says to give a null text alternative, written alt="", when an image only adds decoration and carries no information needed to understand the page [3]. Its decision tree gives the same answer for an image that repeats text sitting next to it [2]. A divider line, a background swirl or a photo that repeats the caption beside it are typical. Leave the attribute in place but empty. Do not remove it, because a missing alt is what Google's own example labels as bad [1].

  • Image is a link or button: describe where it goes or what it does, such as "Download the price list" [3].
  • Image holds text that is also on the page: use an empty alt [2].
  • Image is a chart: put the data in the page text as well [2].
  • Image is purely decoration: use an empty alt [2].

Does alt text matter for Google Images ranking?

Google calls alt text the most important attribute for giving an image extra metadata [1]. It says Google uses alt text along with computer vision and the content of the page to understand an image [1]. When an image is a link, the alt text also acts as anchor text [1]. Google also notes that filenames give only light clues, and that my-new-black-kitten.jpg is better than IMG00023.JPG [1]. Alt text is one part of SEO for images. Pair it with a short, descriptive filename and nearby text. If your images come from a CMS, check that the alt field is filled in.

Questions people ask

Is alt text the same as an image title or caption?

No. Alt text sits in the alt attribute and is read by screen readers. A caption is visible text under the picture. Google also reads captions and image titles on the page to learn what an image shows [1].

How long should alt text be?

The sources give no length limit. W3C asks for at least a short description of the essential information [2]. Write what is needed to understand the image, then stop.

What happens if I skip alt text on decorative images?

Use an empty alt attribute for them, as W3C advises [3]. Leaving the attribute out is a different thing, and Google's example calls that bad [1].

See also

  • Accessibility Web accessibility means designing websites so that people with disabilities can perceive, understand, find their way around and use them.
  • WCAG WCAG is the international standard from the W3C that sets testable rules for making web content usable by people with disabilities.
  • SEO SEO is the work of making your website easy for search engines to understand and easy for people to find in search results.
  • Title tag A title tag is the HTML element that holds a page's title, which search engines often show as the blue headline of a result.
  • Meta description A meta description is a short summary of a page, written in a meta tag in the HTML, that search engines may show under the result title.
  • Responsive design Responsive design is a way of building one website so its layout adapts to the screen it is shown on, from phone to desktop.

References

  1. Google Image SEO best practices, Google Search Central. Read 27/11/2026.Avoid filling alt attributes with keywords (also known as keyword stuffing) as it results in a negative user experience and may cause your site to be seen as spam.
  2. An alt Decision Tree, W3C Web Accessibility Initiative. Read 27/11/2026.Is the image purely decorative or not intended for users? Yes: Use an empty alt attribute.
  3. Images Tutorial, W3C Web Accessibility Initiative. Read 27/11/2026.Provide a null text alternative (alt="") when the only purpose of an image is to add visual decoration to the page