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-04

The image alt attribute (alternative text) is an HTML attribute that describes image content. It affects both image SEO and accessibility, and is essential for gaining traffic from Google Image Search.

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.

今井政和

Written by

今井政和

SEO Director / Frontend Developer

SEO Director with 20+ years of web industry experience. Creator of SEO_CHECK and the official WordPress plugin "ORECTIC SEO CHECK." Author of a book on web strategy inspired by Edo-era merchant principles.

@imai_director

FAQ

Apakah atribut alt wajib dalam HTML?
Ya. Spesifikasi HTML mengharuskan atribut alt pada semua elemen <img>. Untuk gambar yang murni dekoratif, tetapkan alt="" (string kosong) agar screen reader melewati gambar tersebut. Jangan pernah menghilangkan atributnya sepenuhnya — jika tidak ada, screen reader akan membacakan nama file sebagai gantinya.
Berapa panjang optimal untuk alt text?
Jaga alt text di bawah 125 karakter. Sebagian besar screen reader berhenti membaca sekitar 125 karakter. Tulis dengan ringkas dan spesifik. Hindari frasa yang berulang seperti 'gambar dari' atau 'foto dari', dan jangan hanya mengulang nama file.
Haruskah saya menyertakan kata kunci SEO dalam alt text?
Menyertakan kata kunci secara alami baik untuk SEO. Google menggunakan atribut alt untuk memahami konten gambar, sehingga kata kunci yang relevan dan cocok secara alami dapat meningkatkan visibilitas di pencarian gambar. Namun, keyword stuffing (memasukkan kata kunci secara paksa) adalah sinyal spam dan dapat mengakibatkan penalti. Selalu tulis alt text yang mendeskripsikan gambar secara akurat terlebih dahulu.
Apakah gambar SVG memerlukan alt text?
SVG yang dimuat melalui tag <img> memerlukan atribut alt seperti gambar lainnya. Untuk SVG inline (ditulis langsung di HTML sebagai <svg>), gunakan aria-label atau elemen <title> untuk memberikan deskripsi yang aksesibel. Untuk SVG inline yang murni dekoratif, tambahkan aria-hidden="true" agar tersembunyi dari screen reader.
Apakah alt text secara langsung mempengaruhi peringkat SEO?
Ya, terutama untuk peringkat pencarian gambar — alt text adalah salah satu sinyal terpenting. Untuk pencarian web biasa, Google juga menggunakan atribut alt untuk memahami konten halaman. Alt text yang ditulis dengan baik dapat meningkatkan traffic dari pencarian gambar, memperkuat konteks halaman, dan meningkatkan skor aksesibilitas — semua berkontribusi pada performa SEO secara keseluruhan.