What is alt text and why does it exist?
Alt text (short for alternative text) is an HTML attribute added to the <img> tag that describes what an image shows:
<img src="golden-retriever-puppy.jpg" alt="Golden retriever puppy playing with a red ball in a garden" />Alt text serves three purposes:
1. Accessibility: Screen readers read alt text aloud for visually impaired users. This is why alt text is legally required in many countries for public websites.
2. SEO: Google uses alt text to understand image content and include images in relevant Image Search results.
3. Fallback: If the image fails to load, the browser shows the alt text instead, so users know what was supposed to appear.
How to write good alt text
Good alt text is descriptive and specific — it tells a blind person (or a search engine) exactly what the image shows in context.
Bad alt text examples:
- alt="" — empty (fine only for purely decorative images)
- alt="image" — useless
- alt="photo1" — filename, not description
- alt="red ball dog puppy golden retriever grass garden sunny day backyard" — keyword stuffing
Good alt text examples:
- alt="Golden retriever puppy playing with a red ball in a sunny garden"
- alt="Chart showing monthly website traffic growth from January to June 2024"
- alt="Close-up of sourdough bread crust with an open crumb structure"
Rules of thumb:
- Be specific and descriptive (aim for 5–15 words).
- Include your keyword naturally if it's genuinely relevant to the image.
- Don't start with "image of" or "photo of" — Google already knows it's an image.
- Purely decorative images (dividers, background shapes) should have alt="" (empty, not missing).
Image file names matter too
Before an image even reaches the page, its file name is a signal. Compare these two URLs:
/uploads/IMG_4827.jpg— tells Google nothing/images/golden-retriever-puppy-playing.jpg— tells Google exactly what it is
When Google crawls a page and encounters an image, the file name (part of the URL) is one of the first signals it reads to understand the image's subject.
File name best practices:
- Use descriptive, lowercase words separated by hyphens.
- Include a relevant keyword if it accurately describes the image.
- Keep it concise — 3 to 5 words is ideal.
- Never use spaces or underscores (hyphens are the SEO standard separator).
Missing alt text and accessibility compliance
In many countries, providing alt text on meaningful images is a legal requirement under accessibility laws:
- USA: Section 508 of the Rehabilitation Act, ADA Title III
- EU: European Accessibility Act (coming into force 2025)
- UK: Public Sector Bodies Accessibility Regulations
Beyond the legal risk, missing alt text is a real barrier for users with visual impairments. Every image that matters should have descriptive alt text.
The only exception: Decorative images (visual dividers, background patterns, purely aesthetic elements) should use an empty alt attribute alt="" — not a missing alt attribute. An empty alt tells screen readers to skip the image entirely, which is the correct behavior for decoration.
Image titles — an often overlooked attribute
The title attribute on images shows as a tooltip when a user hovers over the image:
<img src="puppy.jpg" alt="Golden retriever puppy playing" title="Goldies are known for their friendly temperament" />Image titles have minimal direct SEO impact, but they can add context and improve user experience. They're optional, but good practice for images where additional context adds value.
Don't duplicate the alt text in the title — they serve different purposes. Alt text is what the image shows; title can add a supplementary fact or caption.
Other image SEO factors
Image size and compression: Large uncompressed images slow down page load. Slow pages rank worse. Compress images using tools like Squoosh, TinyPNG, or convert to WebP format (30-40% smaller than JPEG at equivalent quality).
Lazy loading: Adding loading="lazy" to images below the fold reduces initial page load time:
<img src="image.jpg" alt="Description" loading="lazy" />srcset for responsive images: Serve different image sizes to different screen sizes to avoid loading 2000px images on mobile phones.
Structured data for images: Adding ImageObject schema helps Google understand images in context, especially for recipes, products, and articles.
Hawk Eye does this instantly
Hawk Eye's Images module scans every image on the current page and reports: total images, images missing alt text (with their src URLs listed), images with empty alt, and images with titles. You can spot every missing alt attribute in seconds without digging through page source.
Add Hawk Eye to Chrome — FreeKey Takeaways
- Alt text describes images for both search engines and screen readers — it's an SEO and accessibility requirement.
- Write descriptive, specific alt text (5–15 words); avoid stuffing keywords.
- Use descriptive, hyphenated file names (golden-retriever-puppy.jpg, not IMG_4827.jpg).
- Decorative images should have empty alt attributes (alt=''), not missing alt attributes.
- Compress images and use lazy loading to keep page speed fast.