Spider SEO Auditor
On-page SEO

How to write image alt text for SEO and accessibility

How to write image alt text for SEO and accessibility

Alt text is a short written description of an image, added with the alt attribute on the <img> tag. Screen readers read it aloud to people who cannot see the image, browsers show it when the image fails to load, and search engines use it to understand what the image shows. Good alt text describes the image's content and purpose in one plain sentence, without stuffing keywords.

What does alt text look like in HTML?

Alt text is the value of the alt attribute on an image element. It sits inside the tag and is not visible on the page unless the image fails to load.

<img src="/img/class-10-maths-batch.jpg" alt="Teacher explaining algebra on a whiteboard to a Class 10 batch in Jaipur">

Does alt text help SEO?

Yes. Google says it uses alt text, together with the surrounding text and the file name, to understand what an image is about, which helps the image appear in Google Images and gives context to the page. It is a small signal for the page itself, but it matters a lot for image search and for accessibility. Google's advice is in its image SEO best practices.

How do you write good alt text?

Describe what the image shows and why it is on the page, as you would to someone on the phone. Keep it specific and short, usually one sentence.

  1. Ask what the image adds to the page. Describe that.
  2. Name the specific thing: who, what, where. "Students in a chemistry lab" is better than "image".
  3. Use a relevant keyword only if it fits naturally.
  4. Skip "image of" or "picture of". Screen readers already announce it as an image.
  5. If the image contains important text, such as a fee table or a poster, include that text or put it on the page as real text.
ImageWeak altBetter alt
Campus photo"college""Main library building at the Pune campus"
Product shot"bag bag school bag best bag""Blue waterproof school bag with two side pockets"
Results banner"banner""2026 JEE Main results: 42 students scored above 99 percentile"
Founder photo"photo""Founder Anita Sharma teaching a weekend IELTS class"

When should alt text be empty?

Purely decorative images, such as background flourishes, dividers or icons next to text that already says the same thing, should have an empty alt attribute: alt="". This tells screen readers to skip them. Do not leave the attribute out entirely, because some screen readers then read the file name instead, which is rarely helpful.

The W3C has a short alt text decision tree that helps you decide between descriptive and empty alt for any image.

When an image is the only content of a link, its alt text acts as the link's anchor text. Describe where the link goes or what it does, not what the picture looks like. A logo that links to the home page can use the business name, for example alt="Bright Future Academy home". A magnifying glass icon on a search button should say "Search". See internal linking for why anchor text matters.

How long should alt text be?

There is no official limit, but most good alt text is under about 125 characters. If an image needs a long explanation, such as a chart or an infographic, give a short alt and explain the details in the surrounding text or a caption so everyone can read them.

Common mistakes

  • Missing alt attributes on content images, especially in sliders and galleries.
  • The same alt text on every image, often the page title or business name.
  • Keyword stuffing, which Google treats as a poor practice and which makes the page harder to use.
  • Using the file name as alt text, such as "IMG_2041.jpg".
  • Putting key information only inside an image, like admission dates in a banner, with no text version.
  • Descriptive alt on decorative images, which adds noise for screen-reader users.

How do you check alt text across your site?

Start with the pages that matter most: home page, course or product pages and top blog posts.

  • Run a Spider page audit to list every image on a page that has no alt attribute.
  • Crawl the whole site to find templates, such as blog layouts or gallery pages, where alt is missing everywhere.
  • Fix the template first, then go back and write specific alt text for key images.
  • Pair this with image optimization so the same images also load fast.

Check this on your own site

Spider's free check tests this and about 100 other things on any page, and links each problem to a guide like this one.