0
SEO & AI Search · On-Page Basics

Image Alt Text: How to Write It for SEO and Accessibility

Image alt text is the short written replacement for a picture: what a screen reader speaks, what shows when the file fails to load, and one of the clearest signals Google has about what an image shows. This guide covers when an image needs alt text, when it should be empty, how to write it, how long it should be, examples by image type, and how to check a whole site.

By the GoSocial team19 min read
Image alt text: alt text for images and alt text SEO – United States
Image alt text guide: how to write alt text for images, alt text examples and alt text SEO best practices for business websites across the United States.
Quick answer

Image alt text is the text in the alt attribute of an image. It should state what the image communicates in its place on the page, usually in one short sentence. Informative images need it, images inside links need the destination, and purely decorative images get an empty alt so screen readers skip them.

Image alt text is one of the smallest fields on a website and one of the most often done badly. On many business sites it is missing on half the images, copied from the file name on the rest, and stuffed with the same keyword on the product pages. Each of those habits costs something: a visitor using a screen reader hears nothing useful, and search engines get a weaker description of what the page shows.

The good news is that the rules are short and stable. They come from two places that agree with each other: the accessibility guidance published by the World Wide Web Consortium (W3C) and the image guidance Google publishes for site owners. GoSocial has built websites for businesses across the United States since 2016, and this is the method we use when we write and review alt text on real projects.

What is image alt text?

Image alt text, short for alternative text, is a written replacement for an image. In the page code it lives in the alt attribute of the image element, for example alt="Dalmatian puppy playing fetch". Visitors who see the image never notice it. It matters in three situations where the picture itself cannot do its job:

  • Screen readers. People who are blind or have low vision often use software that reads the page aloud. When it reaches an image, it reads the alt text instead.
  • Broken or blocked images. If the file fails to load, is blocked by a slow connection or an email client, the browser shows the alt text in the empty space.
  • Search engines and other software. Crawlers read the page code. The alt text is a written statement, from the site owner, of what the image is about.

The idea that makes everything else easier is this one: alt text replaces the image, it does not describe it for its own sake. The right alt text is what you would write if the image could not be shown and the sentence had to do the same job. Sometimes that is a description. Sometimes it is the text inside the image. Sometimes it is the destination of a link. And sometimes it is nothing at all.

Why does image alt text matter?

Alt text does three jobs at once, and they do not compete with each other. Good alt text for a screen reader user is also good alt text for a search engine.

Who reads itWhat they needWhat goes wrong without it
Screen reader usersThe meaning of the image in contextThe reader announces the file name or just the word image, or skips content they needed
Visitors on a failed loadA short label in the empty frameAn empty box with no clue what was there
Google Search and Google ImagesWords that tie the image to the page topicThe image is understood only from the file and surrounding text
AI systems that read pagesText they can process alongside the rest of the pageVisual information exists only as pixels

Alt text also sits inside a larger set of image basics: file format, compression, dimensions and loading behavior. We cover those in our guide to image best practices for website development and SEO. This article stays on the written side of the image.

How does Google use image alt text?

Google states it plainly in its image SEO documentation: the alt text is the most important attribute when it comes to providing more metadata for an image. The same page explains that Google uses alt text together with computer vision and the contents of the page to understand the subject matter of an image. You can read the full guidance in Google’s image SEO best practices.

Four points from that page shape how alt text should be written:

  • Useful and information rich. Google asks for useful, information-rich content that uses keywords appropriately and is in context of the content of the page.
  • No keyword filling. Google warns against filling alt attributes with keywords, because it creates a negative user experience and may cause the site to be seen as spam.
  • Alt text in links counts. When an image is used as a link, its alt text is treated much like the anchor text of a text link.
  • Context matters. Google also reads captions, titles and nearby text, and recommends placing images near relevant text on relevant pages.

Google’s own example shows the scale from bad to best. No alt at all is bad. A string of repeated dog words is keyword stuffing. Puppy is better. Dalmatian puppy playing fetch is best, because it says what kind of dog and what is happening, in four words.

Alt text is not a place to add keywords. It is a place to say, in plain words, what the image contributes to the page.

Google does not promise rankings for alt text, and neither do we. Whether a page ranks depends on the whole page, which is why alt text sits next to titles, headings and links in our SEO, AEO and GEO work.

Alt text and accessibility rules in the United States

Text alternatives are the first requirement in the Web Content Accessibility Guidelines (WCAG), the technical standard most US accessibility work refers to. Success criterion 1.1.1, Non-text Content, is a Level A requirement, the most basic level. It says all non-text content presented to the user has a text alternative that serves the equivalent purpose, with a short list of exceptions. The W3C explains each part in Understanding SC 1.1.1 Non-text Content.

The exceptions matter just as much:

  • Controls and inputs need a name that describes their purpose, such as Search or Submit.
  • Decoration, formatting and invisible content must be implemented so assistive technology can ignore it.
  • CAPTCHAs need a text alternative that identifies their purpose, plus another way to complete the check.

On the legal side, the U.S. Department of Justice published guidance on web accessibility under the Americans with Disabilities Act on March 18, 2022. In its list of common barriers, the first item is the lack of text alternatives, called alt text, on images, and it notes that people who are blind will not be able to understand the content and purpose of images without them. The guidance is on ADA.gov.

This is general information, not legal advice. What it shows is that alt text is the first thing an accessibility review looks at, and one of the easiest to fix. Our broader guide on how to create an accessible website covers the other basics.

If you are not sure where your site stands on alt text and accessibility basics, book a Blueprint Briefing and we will look at it with you before any rebuild is on the table.

Does every image need alt text?

Every image needs an alt attribute. Not every image needs words inside it. That distinction resolves most of the confusion.

The W3C publishes an alt decision tree that walks through five questions in order. In plain terms:

  1. Does the image contain text? If the same text is also on the page as real text, or is only there for visual effect, use an empty alt. If the text has a function, such as an icon, describe the function. If the text appears nowhere else, put that text in the alt.
  2. Is the image used in a link or a button? If the link would be hard to understand without the image, the alt should say where the link goes or what the button does.
  3. Does the image add meaning to the page? For a simple photo or graphic, write a short description of that meaning. For a chart or complex graphic, put the information elsewhere on the page too. If the image only repeats nearby text, use an empty alt.
  4. Is the image purely decorative? Use an empty alt.
  5. Still not clear? The tree itself says it does not cover every case, and points to the full W3C images tutorial.

Decorative images and the empty alt

A decorative image is one that adds nothing a visitor would miss if it disappeared: a background texture, a divider line, an abstract shape, a stock photo placed for mood next to text that already says everything.

For these images the correct alt is empty, written as alt="" with nothing between the quotes. That tells screen readers to skip the image entirely. It is different from leaving the attribute out. When the attribute is missing, many screen readers fall back to reading the file name, which is how visitors end up hearing strings like IMG 4471 final v2 jpg.

CodeWhat a screen reader typically doesWhen to use it
alt=”A short description”Reads the descriptionInformative or functional images
alt=”” (empty)Skips the imageDecorative images and images repeated in nearby text
No alt attributeOften reads the file name or says imageNever

Images in links and buttons, including logos

When an image is the only content of a link or button, its alt text becomes the name of that link or button. Here the right alt text describes the action or destination, not the picture.

  • A magnifying glass icon on a search button: alt=”Search”, not alt=”Magnifying glass”.
  • A printer icon that prints the page: alt=”Print this page”.
  • A social icon that links to your profile: alt=”GoSocial on Instagram” or simply the network name, depending on the surrounding context.
  • A product thumbnail that opens the product page: the product name, since that is where the link goes.

Logos are the most common functional image on any site. The logo in the header usually links to the home page. Its alt should be the company name, and some teams add the destination, such as Company name home. What it should not be is the word logo alone, a slogan, or a list of services.

Because Google treats alt text in linked images much like anchor text, the same rules apply as for text links: describe where the link goes, in words a person would expect. Our internal linking strategy guide explains why descriptive anchors matter for both visitors and search engines.

How to write alt text, step by step

Once you know an image needs words, writing them takes less than a minute. The order of the steps is what keeps the result short and useful.

  1. Ask why the image is on this page. Not what it shows in general, but what it adds here. A photo of a finished kitchen on a remodeling page shows the quality of the work. The same photo on a careers page shows the kind of projects a new hire would join.
  2. Imagine reading the page aloud to someone. When you reach the image, what would you say so they do not miss anything? Write that sentence.
  3. Lead with the most important detail. Screen reader users can stop listening at any point. Put the subject first: Kitchen remodel with white shaker cabinets, not A photo that shows a kitchen.
  4. Cut what the page already says. If the heading above reads Our Boca Raton office, the alt does not need the city again.
  5. Skip image of and picture of. Screen readers already announce that the element is an image. Use the word only when the medium matters, such as a screenshot, an illustration or a hand-drawn sketch.
  6. Use the words your visitors would use. If people search for a standing seam metal roof, call it that, not a premium roofing solution. This is where a relevant keyword fits naturally.
  7. Read it back without the image. If the sentence does the image’s job, you are done.

Write alt text in the content stage, not at upload time: the writer knows why each image is there. That step belongs in any website redesign process.

If your team needs a content workflow that includes alt text, captions and file names from the start, a Blueprint Briefing is where we map that out with you.

How long should alt text be?

As long as it needs to be to do the image’s job, and usually one short sentence. Neither the WCAG success criterion nor Google’s image guidance sets a character count. Google’s best example, Dalmatian puppy playing fetch, is four words.

You will see specific numbers repeated in SEO articles, often 125 characters. Treat any fixed number as a habit some tools and teams use, not as a rule from a standard. What is true in practice:

  • Short is easier to listen to. A screen reader reads alt text in one go. A paragraph in an alt attribute is hard to follow and cannot be skimmed.
  • Long content belongs on the page. If an image needs several sentences to explain, put them in the caption, the body text or a linked description, and keep the alt short.
  • Some platforms set their own limits. Content management systems, social networks and email tools may cut or limit the field, so check where the text will be displayed.
Too shortAbout rightToo long
RoofNew standing seam metal roof on a two-story home.A beautiful new standing seam metal roof installed by our expert roofing team on a lovely two-story family home on a sunny day with blue sky and trees.
TeamFive members of the support team at their desks.A photo of our friendly, dedicated and experienced team of support professionals who are always ready to help you with any question.

Image alt text examples by image type

The same rules lead to different answers depending on what the image is doing. This table covers the image types most business websites use.

Image typeWhat the alt should carryExample
Product photoProduct name and the detail the angle showsLeather tote bag in tan, side view showing the zip pocket.
Service photoThe work and the resultTechnician replacing an outdoor air conditioning unit.
Before and afterWhat changed, in each imageBefore: cracked concrete driveway. After: resurfaced driveway with new edging.
Team or headshotName and role, if not already in nearby textMaria Lopez, office manager.
Linked logoCompany name and destinationCompany name, home page.
Icon with a functionThe actionOpen menu.
ScreenshotWhat the screenshot proves or showsScreenshot of the booking form with date and time fields.
Map imageThe location information, also given as textMap showing the office one block east of the main highway exit.
Stock photo for moodUsually nothingalt=”” (empty)

Alt text examples for common business pages

Page type changes what a visitor needs from each image. Here is how we approach the pages most small and mid-size business sites have.

  • Home page hero. If the hero image is a mood photo behind a headline, it is usually decorative. If it shows the actual product or work, describe it in one line. The headline should do the selling, as we explain in our guide to the hero section.
  • Service pages. Show real work and say what it is. Alt text on service pages is where specific, plain service words fit naturally, because they describe the photo honestly.
  • Portfolio and case studies. Name the project type and what the image proves: a responsive layout on a phone, a finished storefront, a dashboard view. If the client name is public on the page, it can appear in the alt.
  • About page. Team photos need names and roles unless the caption already gives them. Office photos are informative if they help a visitor find you. Our guide to the about us page covers what the rest of that page should do.
  • Contact page. A map image needs the address in text somewhere on the page. Do not leave directions only inside a picture.

Real estate sites are a special case because they are image heavy. Each listing photo should name the room or feature it shows, such as Primary bedroom with a walk-in closet or Backyard pool with covered patio, so a visitor using a screen reader can tour the home in words. The same thinking applies to a single property website, where photos are most of the page.

Images of text, charts and infographics

Images that contain information, not just a scene, need extra care because a short alt cannot hold everything they show.

Images of text. A banner, a quote card or a promotional graphic with words in it should have those words in the alt, unless the same words are already on the page as real text. Better still, avoid putting important text in images at all. Real text can be read by everyone, resized, translated and indexed without guesswork.

Charts and graphs. Give the alt a short summary of what the chart shows, such as the main trend, and put the data itself on the page as a table or a paragraph. A chart that says sales doubled between two years needs that sentence in text, not just in bars.

Infographics and diagrams. Use a short alt that names the infographic and its point, then provide the full content as text on the page or on a linked page. This is the long description approach the W3C tutorial describes for complex images.

A useful rule: if the image were deleted, could the page still be fully understood? If not, the missing information belongs in text somewhere, not only in the alt. That also helps search engines and AI tools, which read the page text with far more confidence than an image.

Pages built around charts, calculators or visual comparisons need this planned before design. If that describes your site, talk it through with us in a Blueprint Briefing before content is locked.

Alt text and keywords: where the line is

Using a keyword in alt text is fine when it describes the image accurately. Adding keywords that do not describe the image is what Google calls filling alt attributes with keywords.

The test is honest description. If your page is about kitchen remodeling and the photo shows a remodeled kitchen, the alt will naturally contain those words. If the photo shows a smiling handshake, writing kitchen remodeling contractor in the alt is not a description, it is an attempt to rank.

ApproachExampleVerdict
Accurate and specificRemodeled kitchen with quartz counters and a center island.Good: describes the image, and the topic words appear naturally
Keyword onlyKitchen remodeling.Weak: true, but tells a listener little
Keyword listKitchen remodel, kitchen remodeling, best kitchen remodeler, kitchen contractor.Spam: unhelpful and risky
Keyword not in the imageKitchen remodeling contractor (on a photo of a handshake).Misleading: the image shows something else

Keyword choices for the page itself, its title and its meta description are a separate job. Our guides to the SEO title tag and the meta description cover those fields.

Alt text vs caption, title attribute, file name and description

Images can carry several pieces of text. They are read by different people at different times, so they should not all say the same thing.

FieldWho sees itWhat to put there
Alt textScreen reader users, search engines, anyone when the image failsThe image’s purpose on the page, short
CaptionEvery visitor, below the imageContext or a point the image supports, can be longer
Title attributeSome visitors, as a tooltip on mouse hoverOptional extra information; not a replacement for alt
File nameSearch engines, people who download the fileShort descriptive words, such as metal-roof-two-story-home.jpg
Media library descriptionUsually only editors, sometimes on attachment pagesInternal notes or a longer description

On file names, Google recommends short but descriptive names and gives the example that my-new-black-kitten.jpg is better than IMG00023.JPG. Renaming files before upload takes seconds and costs nothing.

AI search tools, including Google’s AI Overviews and assistants that browse the web, work from what they can retrieve and read on a page. Alt text is part of the page code they can read, so it is part of the material available to them when they decide what an image shows and whether a page answers a question.

It is important to be precise here. No AI platform has published a rule that says alt text leads to a citation, and no one can guarantee a citation. We do not, and you should be careful with anyone who does. What we can say is that pages where every important piece of information exists as clear text are easier for any system to read, summarize and quote.

That is where alt text fits in an AI search plan:

  • Do not lock answers inside images. If your pricing structure, hours, service list or process lives only in a graphic, a system that reads text may miss it. Put it on the page as text and keep the alt short.
  • Describe proof images precisely. A screenshot of a review, a certificate or a result should say what it shows, and the same fact should appear in text nearby.

Alt text is one small part of answer engine and generative engine optimization. The bigger levers are clear structure, direct answers and signals of real experience. Our guides on how to appear in AI Overviews and on query fan-out explain how AI search decides what to read and quote.

AI alt text generators: useful, with review

Many tools now write alt text automatically, from browser extensions to features inside content management systems. They can describe a photo in seconds, and on a site with thousands of product images that speed is real.

The limit is context. A generator sees the image. It does not know why the image is on this page, which details matter to your buyer, or whether the image is decorative. That is why generated alt text tends to fail in predictable ways:

  • It describes instead of explaining. A man in a blue shirt pointing at a screen, when the image exists to show the new dashboard.
  • It misses the product details. It says a bag, not the model name and color your customers search for.
  • It writes alt for decorative images. Every background photo gets a sentence that screen readers will now read aloud.

Our recommendation is to use a generator as a first draft, then have a person who knows the page review each important image with the five decision tree questions. For large catalogs, define a pattern for product images, such as product name, color and view, and let the tool fill it from product data rather than from the picture alone.

The same principle applies to any AI writing on a website, which we discuss in our comparison of AI website builders and hiring a web development company: automation is a draft, and someone accountable checks it.

Want a review of how your site handles images, alt text and AI-generated content? Book a Blueprint Briefing and bring the pages that matter most.

Where to add alt text in WordPress and custom sites

Where you type alt text depends on how the site is built, and one detail trips up many teams.

WordPress. The media library has an Alternative Text field for each image. The block editor also shows an alt text field in the image block settings. The detail that matters: depending on the theme, builder and when the image was inserted, the alt in a page may be copied at insertion time rather than pulled live from the media library. Changing the library field later does not always update pages where the image is already placed. After a bulk update, check a few live pages instead of assuming.

Custom-coded sites. Alt text is written in the template or comes from the content source, such as a product database or a headless content system. The right setup is a required alt field in the content model, with a way to mark an image as decorative on purpose, so empty alt is a decision rather than an accident.

Whichever platform you use, the content model decides the result more than the writers do. If the field is optional and hidden, it will stay empty. GoSocial builds both custom-coded and WordPress websites, and on either one the alt field is part of the content structure from the start.

How to audit alt text on an existing website

You do not need special software to start. A simple audit takes one afternoon for a small site and gives you a clear fix list.

  1. List the pages that matter. Home page, main service or product pages, contact, about and the top pages in Google Search Console by clicks.
  2. Check for missing alt attributes. Lighthouse, built into Chrome developer tools, flags image elements that do not have alt attributes in its accessibility report. Run it on each key page.
  3. Check the quality, not just the presence. Tools confirm an alt exists. They cannot tell if it says IMG 2231, repeats the same keyword or describes the wrong thing. Open the page code or use a browser extension that shows alt text over images, and read it.
  4. Test with a screen reader. Windows includes Narrator and Apple devices include VoiceOver. Listen to one key page from top to bottom. It is the fastest way to hear what a screen reader user hears.
  5. Prioritize. Fix linked images and key informative images first, then product and service images, then decorative ones that should be empty.

Search Console does not give an alt text report, so do not wait for a warning there. Treat alt text like any other on-page element and recheck it whenever templates change.

Every GoSocial site launches with GA4 and Google Search Console connected, so you can see which pages to audit first.

Common image alt text mistakes and how to fix them

Most problems we see on audits fall into a short list. Each one has a simple fix.

MistakeWhy it hurtsFix
Alt attribute missingScreen readers may read the file nameAdd alt, or alt=”” if decorative
File name as altTells no one anythingWrite a real description
Same alt on every imageSignals text not written for the imageWrite per image, or empty for duplicates
Keyword listsBad experience and a spam riskOne honest sentence
Starting with image ofWastes the listener’s timeStart with the subject
Logo alt is the word logoThe link has no useful nameCompany name, plus destination if linked
Icon alt describes the drawingThe action is unclearName the action, such as Search
Important text only inside an imageHidden from text readers and hard to resizePut the text on the page
Alt on decorative imagesNoise for screen reader usersUse alt=””

The same discipline applies to other small on-page elements that quietly fail, from error pages to footers. Our guides to the 404 page and the website footer follow the same check-it-live approach.

Image alt text checklist before publishing

Use this list on every page before it goes live. It takes a few minutes and catches nearly everything covered in this guide.

  • Every image element has an alt attribute, even if it is empty.
  • Decorative images and images repeated in nearby text use alt=””.
  • Linked images and icons describe the destination or action.
  • Informative images have one short sentence that leads with the subject.
  • Text inside images also appears on the page, or is in the alt.
  • Charts and infographics have their key information in text on the page.
  • No two images on the page share the same alt by accident.
  • Keywords appear only where they honestly describe the image.
  • File names are short and descriptive, and captions add context instead of repeating the alt.
  • The live page, not just the editor, shows the alt you wrote.

None of this needs a specialist tool or a large budget. It needs a decision about who owns the field and a habit of checking it. That is also how we approach the rest of a website at GoSocial: we do not promise a score, we build for the metrics and show you the measurements. You can see how that works across our custom web development projects.

Image alt text: FAQ

What is image alt text in simple terms?

It is a short written replacement for an image, stored in the alt attribute of the image in the page code. Screen readers read it aloud, browsers show it when the image fails to load, and search engines use it to understand what the image shows.

Does image alt text help SEO?

Yes, as a description. Google says alt text is the most important attribute for giving it more information about an image, and uses it with computer vision and the page content. It helps Google understand the image. It is not a ranking guarantee, and filling it with keywords can be treated as spam.

How long should alt text be?

Usually one short sentence. The WCAG criterion and Google’s image guidance do not set a character count. If an image needs more explanation, keep the alt short and put the details in the caption or the page text.

Should decorative images have alt text?

They should have an empty alt attribute, written with nothing between the quotes, so screen readers skip them. Leaving the attribute out entirely is different and often makes screen readers read the file name instead.

What is the difference between alt text and a caption?

Alt text replaces the image for people and software that cannot see it, and most visitors never see it. A caption is visible to everyone below the image and adds context. They should complement each other, not repeat the same sentence.

Can I use AI to write alt text for my website?

Yes, as a first draft. Generators see the picture but not why it is on the page, so they miss product details, write alt for decorative images and sometimes guess. Have a person who knows the page review the important images before publishing.

GoSocial

Custom web design company in Boca Raton, Florida, building custom-coded and custom WordPress websites for businesses across the USA since 2016.

WhatsApp Free Blueprint Back to top