Alt text
What is alt text?
Alt text, set with the HTML alt attribute on an <img> element, is a short text alternative that describes an image. Screen readers read it aloud to people who can’t see the image, browsers show it if the image fails to load, and search engines use it, along with the page context, to understand what the image shows.

Good alt text describes the image’s content and purpose in context, briefly. Purely decorative images should have an empty alt attribute (alt="") so screen readers skip them. Alt text is not a place for lists of keywords: Google warns that keyword stuffing in alt attributes makes for a poor user experience and can make a site look spammy.
Alt text is one part of image SEO. Google also reads the filename, captions and the text around the image, so an image placed next to a relevant paragraph is easier to understand than one floating alone in a gallery.
Why alt text matters for SEO
Alt text is one of the main ways Google understands images, which helps them rank in Google Images and image results within the main SERP. When an image is a link, its alt text acts like anchor text.
It is also an accessibility requirement under WCAG and, in many countries, accessibility law. Good alt text helps real people first.
How to write alt text
- Describe what the image shows and why it is there, in one short sentence or phrase.
- Be specific: “Golden retriever puppy chewing a red rope toy” beats “dog”.
- Include a keyword only if it describes the image naturally.
- Don’t start with “image of” or “picture of”; screen readers already announce an image.
- Use alt="" for decorative images, and describe the action for linked images or buttons.
Alt text example
<img src="/img/starter-day-5.webp" alt="Sourdough starter on day 5, bubbly and doubled in size in a glass jar" width="800" height="600">
<!-- Decorative divider: empty alt -->
<img src="/img/divider.svg" alt="">Alt text FAQ
Is alt text a ranking factor?
It helps images rank in image search and helps Google understand page content. Its effect on the page’s web ranking is small; its main value is accessibility and image search.
How long should alt text be?
There is no strict limit, but keep it concise, usually a short sentence. Use the surrounding text or a caption for longer explanations.
Is it an alt tag or alt attribute?
Technically an alt attribute on the <img> element. “Alt tag” is a common informal name for the same thing.
Related SEO terms
Image SEO is optimising images so they load fast, are understood by search engines and can rank in Google Images and image results.
Anchor text is the visible, clickable text of a link. Search engines read it as a clue to what the linked page is about.
An image pack is a row or block of image results inside Google’s main search results, linking to Google Images and the source pages.
On-page SEO is optimising the content and HTML of each page, such as text, title tag, headings, images and internal links, to rank and earn clicks.
Keyword stuffingBlack hat
Keyword stuffing is filling a page with keywords, numbers or place names in an unnatural way to manipulate rankings, against Google’s spam policies.