Content SEO

How to Write Image Alt Text
SEO & Accessibility Best Practices

Alt text is critical for both image SEO and accessibility. Learn the right way to write it, with good vs. bad examples and the most common mistakes to avoid.

6 min read2026-04-25

What Is the Alt Attribute?

The alt attribute (alternative text) is set on <img> elements and provides a text alternative when the image cannot be displayed. It plays a vital role in situations ranging from network failures and broken images to screen reader access for visually impaired users.

Search engines like Google also read alt attributes to understand image content. Setting descriptive alt text helps your images appear in image search results, directly increasing search traffic.

<img src="team-meeting.jpg"
alt="Three engineers reviewing code on a whiteboard"
/>

Why Does Alt Text Matter?

There are three main reasons alt text matters: ① increasing traffic from Google Image Search, ② compliance with accessibility laws (ADA, WCAG, and Japan's Act for Eliminating Discrimination against Persons with Disabilities), and ③ helping Google better understand your page content.

+12%

Increase in image search traffic from proper alt text

~50%

Sites with at least one image missing alt text

23%

Share of web traffic from image search

Google Image Search accounts for approximately 23% of all web traffic. Studies show that sites with properly set alt attributes see an average 12% increase in image search traffic. Image optimization is an essential pillar of any SEO strategy, not just text content.

5 Rules for Writing Good Alt Text

Describe the image content specifically

Instead of 'a photo of a meeting', write 'three engineers reviewing code in front of a whiteboard'. Help people who can't see the image visualize exactly what it shows.

Include keywords naturally

Work relevant SEO keywords into the description naturally. For product images, include the product name, model number, and color — this increases visibility in image search.

Keep it concise (under 125 characters)

Most screen readers stop reading at 125 characters. Be specific but brief. Avoid redundant phrases like 'image of' or 'photo of' — these add length without adding meaning.

Use alt="" for decorative images

Decorative elements like dividers, background textures, and design flourishes should have alt="" (empty string). This tells screen readers to skip the image without disrupting the user's experience.

Use descriptive file names too

Name files like 'tokyo-office-team-meeting.jpg' rather than 'img001.jpg'. Meaningful file names help Google understand the image context alongside the alt text.

Good vs. Bad Alt Text Examples

Photo (person)
Bad
alt="photo of a person"

→ No information about who or what is happening. 'photo of' is also redundant.

Good
alt="A freelance web designer working on a MacBook at a home office desk"

→ Conveys the situation, occupation, and tool clearly.

Chart / diagram
Bad
alt="a chart"

→ Provides no information about what the chart shows.

Good
alt="Line chart showing average website page speed in 2024: 2.8s on mobile, 1.4s on desktop"

→ Includes chart type, topic, and key data points.

Decorative image
Bad
alt="blue wave background image"

→ Describing a decorative image forces screen readers to announce irrelevant content.

Good
alt="(set alt="")"

→ Empty alt declares it as decorative. Screen readers skip it entirely.

4 Common Alt Text Mistakes

Missing alt attributes on all images

The most common mistake. Without alt text, screen readers read out the filename. It also hurts image search indexing. Build a habit of adding alt text every time you upload an image to your CMS.

Keyword stuffing

Writing alt="SEO SEO optimization SEO checker SEO tool SEO audit" violates Google's guidelines. It risks penalties and creates a terrible experience for screen reader users.

Starting with 'image of' or 'photo of'

Phrases like 'photo of a woman' or 'image of a graph' are redundant. Screen readers already announce 'image:' before reading alt text, so these additions waste character space.

Adding descriptive alt to decorative images

Setting alt="decorative divider line" on a purely decorative element forces screen readers to announce irrelevant content. Always use alt="" for decorative images.

Check Your Site's Image Alt Attributes

Enter a URL to instantly check image alt attribute coverage, missing instances, and improvement suggestions. Also checks title, meta description, and structured data.

FAQ

Is the alt attribute required in HTML?
Yes. The HTML specification requires the alt attribute on all <img> elements. For purely decorative images, set alt="" (empty string) to tell screen readers to skip the image. Never omit the attribute entirely — if missing, screen readers will read out the filename instead.
What is the optimal length for alt text?
Keep alt text under 125 characters. Most screen readers stop reading at around 125 characters. Write concisely and specifically. Avoid redundant phrases like 'image of' or 'picture of', and don't just repeat the filename.
Should I include SEO keywords in alt text?
Including keywords naturally is good for SEO. Google uses alt attributes to understand image content, so relevant keywords that fit naturally can improve image search visibility. However, keyword stuffing (cramming in keywords unnaturally) is a spam signal and can result in penalties. Always write alt text that accurately describes the image first.
Do SVG images need alt text?
SVGs loaded via <img> tags need alt attributes just like any other image. For inline SVGs (written directly in HTML as <svg>), use aria-label or a <title> element to provide accessible descriptions. For purely decorative inline SVGs, add aria-hidden="true" to hide them from screen readers.
Does alt text directly affect SEO rankings?
Yes, especially for image search rankings — alt text is one of the most important signals. For regular web search, Google also uses alt attributes to understand page content. Well-written alt text can increase image search traffic, strengthen page context, and improve accessibility scores — all of which contribute to overall SEO performance.