The Complete Guide to Alt Text for SEO and Accessibility

#AltText #WebAccessibility #ScreenReaders #WCAG
Photo of Researcher
Yotam Flohr
Researcher

Our methodology

Our unique research methodology for digital accessibility combines user testing, feature analysis, and hands-on experience. We review various remediation software and platforms to provide top recommendations.

Written and researched for humans by humans

Photo of Researcher
Yotam Flohr
Researcher
Photo of Expert
Ritvik Shrivastava
Expertly reviewed by
Comments: 0

What would the web be without images? They catch the eye, tell stories, showcase products, and enhance the user experience. But, without the right context, their impact can fall flat.

That’s where alt text comes in.

Alternative text acts as a vital bridge between visual content and comprehension. It ensures visually impaired users can interpret images and allows search engines to accurately index visuals.

In this complete guide, we’ll explore everything you need to know about alt text, from what it is and why it matters, to how you can use it effectively for both accessibility and SEO. 

What Is Alt Text?

Alt text, short for alternative text, is a written description of an image that appears in your HTML code. 

Its primary function is to convey the essential information of an image when the image itself can’t be seen. This could be due to a visual impairment, a broken image link, or because someone is using a screen reader. 

For example, instead of seeing a photo of a golden retriever, a screen reader might announce: “A golden retriever puppy playing with a tennis ball.”

Alt text is a key component of accessible web design. It ensures that all users can understand the purpose and message of your visual content. 

But, beyond accessibility, alt text also plays a behind-the-scenes role in SEO by giving search engines more context about your content.

The HTML alt Attribute Explained 

In HTML, alt text is added using the alt attribute within an <img> tag. Here’s a simple example:

Code example
<img src="puppy-playing.jpg" alt="Golden retriever puppy playing with a tennis ball"> Copy

In this code, alt=”Golden retriever puppy playing with a tennis ball” provides the textual description of the image. If the image can’t load, this alt text will be displayed instead. And if a screen reader is being used, it will read the alt text aloud.

Alt Text vs. Image Title vs. Image Caption

It’s easy to confuse alt text with image titles and captions, but they serve different purposes:

  • Alt Text: Is invisible to most users, unless the image doesn’t load. Image alt text is primarily for screen readers and SEO and it’s required for accessibility compliance.
  • Image Title: Is a tooltip that appears when a user hovers over an image, but only in certain browsers. It’s not a substitute for alt text though and has minimal impact on SEO or accessibility.
  • Image Caption: Is visible on the page, usually appearing below the image. Captions provide context to all users and are part of the overall visual presentation.

The Essential Role of Alt Text: More Than Just SEO

There are a few reasons why alternative text needs to be a key consideration for business owners, marketers, and web developers.

Legal Compliance

Alt text plays a leading role in creating an inclusive digital environment and it isn’t just a best practice either, it’s a requirement.  

The Web Content Accessibility Guidelines (WCAG), an internationally recognized standard for web accessibility, emphasize the need for text alternatives for non-text content, including images. 

Meeting these guidelines is essential for compliance with accessibility laws in many countries, including the Americans with Disabilities Act (ADA) and the European Accessibility Act (EAA).

Without meaningful alt text, visually impaired users are left in the dark, unable to understand key visuals that could convey important content, instructions, or context. Alt text empowers them to experience the full story your website tells.

SEO Benefits: Helping Search Engines See Your Images

While alt text is foundational for accessibility, it also quietly boosts your site’s visibility in search engines. Unlike humans, search engines can’t “see” images, they rely on contextual clues to understand what an image is about. Alt text provides that context.

Search engines like Google crawl alt text to determine what an image represents. This not only helps your images appear in image search results, but it also strengthens your page’s overall SEO by reinforcing content relevance. For example, if your blog post is about “vegan desserts” and your image has alt text like “chocolate avocado mousse in a glass jar,” that text supports the theme of your content.

Optimized alt text can:

  • Improve image search rankings
  • Increase organic traffic
  • Enhance topical relevance and page indexing

In short, it helps search engines connect the dots between your images and your content strategy.

When Images Fail to Load

Sometimes, images don’t load properly due to slow connections, broken links, or browser issues. When that happens, alt text acts as a fallback, displaying in place of the missing image.

This not only prevents blank spaces from confusing users but also communicates what should be there, ensuring that the message of your page isn’t lost. A well-written alt description can maintain the flow of your content and reduce frustration, especially in important areas like product pages, infographics, or how-to guides.

Even when things go wrong, alt text keeps your site functional, readable, and user-friendly.

disabled man with his parents

How to Write Effective Alt Text: Essential Best Practices

Next, let’s delve into a few of the best practices you should adhere to when adding alternative text to your website’s images.

  1. Be Descriptive and Specific. When writing alt text, only focus on the details that matter. What’s actually in the image? You also want to use clear, concrete language that’s easy to understand.
  2. Keep it Concise. Most screen readers cut off alt text after about 125 characters, so don’t add unnecessary words.
  3. Provide Context Relevant to the Page. Tailor your alt text to support the surrounding content or message. What should a user take away from it?
  4. Avoid Keyword Stuffing. Never cram keywords into your alt text just for SEO – it harms both user experience and search rankings.
  5. Don’t Start With “Image of…” or “Picture of…”. Screen readers already announce it’s an image, so no need to repeat that. Rather get straight to the description.
  6. Use Keywords Naturally and Appropriately. It’s fine to include relevant keywords if they fit the image and its context. Make sure they appear organically within the description.
  7. Use an Empty Tag for Decorative Images. For purely decorative images (e.g., background flourishes, spacers), use an empty alt attribute: alt=””. This tells screen readers to skip the image entirely.

Alt Text Examples: The Good vs. The Bad

To help you understand these best practices even better, let’s look at a few examples of good and bad alternative text. Remember, the idea is for the text to be clear, descriptive, and help a user (or search engine bot) visualize and understand what’s on the page. 

Example 1: Simple Object (e.g., a red apple)

  • Bad Alt Text: apple
  • Good Alt Text: A shiny red apple with a green leaf on a white table

Example 2: Action Scene (e.g., person riding a bike)

  • Bad Alt Text: person on bike
  • Good Alt Text: Woman in a yellow jacket riding a bike through a city park in autumn

Example 3: Chart or Graph (Summarize key finding)

  • Bad Alt Text: Bar chart of sales data
  • Good Alt Text: Bar chart showing a 30% increase in online sales from Q1 to Q2 in 2024

Example 4: Logo Image 

  • Bad Alt Text: logo
  • Good Alt Text: Nike logo

Best Practice for Decorative Logo in Header: If the logo is decorative and accompanied by text (e.g., in a header), use: alt=””. This avoids redundancy if the brand name is already on the page.

Example 5: Image Links (Describe the destination or action)

  • Bad Alt Text: click here
  • Good Alt Text: Learn more about our solar panel installation services

Laptop with screen reader

How to Add Alt Text on Different Platforms

Every platform, whether web or social media, has a different method for adding alternative text. Here’s what you need to know.

Adding Alt Text in WordPress

Adding alt text in WordPress is straightforward and can be done during the upload process or when editing media:

Option 1 In the Media Library:

  • Go to your WordPress dashboard.
  • Navigate to Media > Library.
  • Click on an image.
  • On the right-hand side, you’ll see an Alt Text field. Enter a concise, descriptive text.
  • Click Update to save.

Option 2: In the Block Editor (Gutenberg):

  • Select the image block in your post or page.
  • In the right-hand sidebar under Block Settings, locate the Alt Text (Alternative Text) field.
  • Enter your alt text directly.

Adding Alt Text on eCommerce Platforms

Shopify:

  • From your Shopify admin, go to Content > Files or Products > All Products (if the image is product-specific).
  • Click on a product to edit.
  • Hover over an image and click the pencil/edit icon.
  • Enter the alt text in the Image alt text field.
  • Click Done, then Save your changes.

BigCommerce / WooCommerce:

  • Both platforms allow alt text editing during product image upload or within image settings.
  • In WooCommerce, you’ll use WordPress’s media library functionality to assign alt text.

Adding Alt Text in Other Website Builders

Squarespace:

  • Select the image block on a page.
  • Click Design > Image Editor.
  • Scroll to Filename or Alt Text (varies by version).
  • Type your alt description and save.

Wix:

  • Click on the image.
  • Select Settings or Edit.
  • Find the Alt Text field under Image Settings.
  • Add your alt text and save.

Alt Text on Social Media

Alt text isn’t just for websites. Social media platforms are increasingly accessibility-conscious too.

Instagram:

  • When creating a new post, go to Advanced Settings before publishing.
  • Select Write Alt Text under Accessibility.
  • Add your description and share your post.

Twitter (now X):

  • Upload an image when composing a tweet.
  • Click +ALT on the image.
  • Enter your description (up to 1000 characters) and click Done.

LinkedIn:

  • When uploading an image, click the Edit icon (pencil).
  • Select Add Alt Text, enter your description, and click Save.

Facebook:

  • Upload your image.
  • Click Edit Photo before posting.
  • Select Alternative Text from the left-hand menu.
  • Enter a custom description or edit Facebook’s auto-generated text.

developer reviewing alt text on a website

Tools for Checking and Managing Alt Text

Due to the increasing importance of web accessibility, there are now a number of tools you can use to check whether you are missing any alt text on your website or app.

Browser Developer Tools

Most modern browsers offer built-in developer tools that allow you to inspect image elements directly on your website.

Whether you’re using Google Chrome, Microsoft Edge, or Firefox, you can follow these steps to manually check for alternative image text:

  1. Right-click on an image and select Inspect.
  2. In the HTML pane, find the <img> tag and look for the alt attribute.
  3. If it’s missing or irrelevant, you’ll spot the issue immediately.

SEO Audit Tools

SEO-focused platforms can scan your entire website and flag images that are missing alt text or have unoptimized descriptions.

  • Screaming Frog SEO Spider. Once you crawl your website, navigate to the Images tab and filter the results by “Missing Alt Text” or “Alt Text Over 100 Characters.”
  • SEMrush. With SEMrush, you can perform a comprehensive audit, including an Images section that reports on missing or duplicate alt attributes.
  • Ahrefs and Moz Pro. These tools also include image-related checks in their audits.

Accessibility Checker Tools / Browser Extensions

These tools help ensure your site meets accessibility standards like WCAG, and many specifically highlight alt text issues:

  • AccessibilityChecker.org. Choose between free and paid scans that can help you easily identify whether alt text is missing on your site and where. You can also identify other web accessibility issues at the same time.
  • WAVE. This browser extension or online tool visually marks accessibility problems on your webpage, including missing alt text.
  • axe DevTools (by Deque). This is another browser extension that’s compatible with Chrome and Firefox and integrates into your dev tools and performs WCAG-compliant audits.

Wrapping Up

Alt text may seem like a small detail, but it plays a powerful dual role: making your content accessible to users of all abilities while helping search engines better understand and rank your pages. 

By writing thoughtful, relevant descriptions for your images, you’re not only enhancing the user experience but also supporting ethical web practices and boosting your site’s visibility.

Alt text should never be an afterthought. With the tips, examples, and tools in this guide, you now have everything you need to write alt text that is clear, compliant, and SEO-friendly.

Remember: great content isn’t just what people can see, it’s what everyone can understand.

I have been helping global businesses bring their brands to life online for over 14 years now and I still love it! I am particularly passionate about ensuring online content is accessible to everyone. I’ve spent years learning as much as possible about web accessibility, ensuring I can educate others on its importance no matter what sector they are in.
Photo of Researcher
Yotam Flohr
Researcher
Yotam Flohr is a prominent digital accessibility expert with over five years of experience in the field. Before specializing in accessibility, Yotam worked on various online projects and collaborated with major internet companies like Wix. His transition to digital accessibility was a natural progression, driven by his commitment to creating inclusive web experiences.
How we reviewed this article
  1. Current version
  2. First Draft of the Article April 30, 2025

    What we changed

    This guide was expertly reviewed for accuracy prior to publishing

0 comments

Subscribe
Notify of
guest
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments