Alt text is a short written description of an image, set in the alt attribute of the <img> element. Screen readers read it aloud to people who cannot see the image, browsers show it when the image fails to load, and Google uses it to understand what the image shows. Good alt text says what the image shows and why it is on the page, in a phrase or a short sentence; purely decorative images get an empty alt="" so screen readers skip them. To find every image on a page that is missing alt text, paste the URL into our free image alt text checker.
Below: what alt text is for, the rules for writing it and how long it should be, an alt text examples table for the images every SaaS site has, how to handle decorative images, charts and icons, and the image SEO basics (file names, formats, context) that work alongside it.
What alt text is for
<img src="/images/invoice-dashboard.png"
alt="Ledgerly dashboard showing three overdue invoices and a reminder scheduled for Friday">
Alt text has two audiences, in this order.
1. People who cannot see the image
Alt text exists for accessibility first. Blind and low vision people using screen readers hear the alt text in place of the image. People on slow connections, or with images turned off, see it in the empty box where the image should be. The accessibility guidelines most laws point to (WCAG) require a text alternative for every image that carries meaning; it is one of the most basic, Level A requirements.
If you write alt text for this audience, you will almost always write good alt text for search too.
2. Search engines and image search
Google says it uses alt text along with computer vision and the content of the page to understand an image. That understanding decides whether the image appears in Google Images and image results inside normal search. Its image SEO best practices give a simple progression: no alt is bad, a keyword list is bad (and may be seen as spam), "puppy" is better, and "Dalmatian puppy playing fetch" is best. When an image is a link, its alt text also works as the anchor text for that link.
How to write alt text
Ask one question: if you were reading this page aloud to someone over the phone, what would you say when you reached the image? That sentence is usually the alt text.
- Describe what matters in this context. The same screenshot might need "Invoice editor with the due date field highlighted" in a tutorial and "Ledgerly invoice editor" on the homepage. Say what the image is there to show.
- Be specific. "Chart" tells nobody anything. "Bar chart: signups doubled from March to June" does.
- Skip "image of" and "picture of". Screen readers already announce that it is an image. "Screenshot of" is fine when the fact that it is a screenshot matters.
- Include any text in the image. If a badge says "Product of the Week", the alt text should say it too.
- Do not repeat the caption or the paragraph next to it. If the text already says everything the image shows, the image may be decorative.
- Use keywords only when they describe the image. "Ledgerly invoice software dashboard" is fine on your invoice software page. "invoice software, best invoice app, free invoicing tool" is stuffing.
- Write it like a sentence, with normal capitals. A full stop at the end is optional; it gives screen readers a slight pause.
How long should alt text be?
HTML sets no length limit. A common guideline is to keep alt text to around 125 characters or less, about one sentence, because it is read in one breath and listeners cannot skim it. That is a writing guide rather than a hard rule: a few extra words are fine when they carry meaning. If an image needs a paragraph to explain, such as a detailed chart, give it a short alt and put the full description in the page text (more on that below).
Alt text examples for a SaaS site
These examples use Ledgerly, an invented invoicing product, and cover the images almost every startup site has.
| Image | Weak alt text | Better alt text | Why |
|---|---|---|---|
| Logo in the header, linking home | logo | Ledgerly home | A linked image's alt describes where the link goes |
| Logo on its own (press kit, about page) | ledgerly-logo-final-v2 | Ledgerly | The name is the meaning of a logo |
| Customer logos strip | logos | Acme Studio (one alt per logo, the company name) | Each logo is a claim: name the company |
| Hero product screenshot | screenshot | Ledgerly dashboard showing overdue invoices and scheduled reminders | Says what the product does at a glance |
| Feature screenshot in a tutorial | reminder settings | Reminder settings with "3 days after due date" selected | Shows the step the reader needs |
| Chart in a blog post | graph | Line chart: average days to payment fell from 34 to 12 after reminders | States the finding, not just the chart type |
| Founder headshot by a quote | photo | Maya Chen, founder of Ledgerly | Who the person is is what matters |
| Award or launch badge | badge | Product of the Week, Aback Launch | Repeats the text inside the image |
| Icon button with no visible text | (missing) | Download invoice as PDF | Describes the action, not the icon shape |
| Icon next to a text label | check mark icon | (empty: alt="") | The label already says it; the icon is decoration |
| Abstract background shape | blue blob | (empty: alt="") | Decorative: adds nothing for a listener |
Two patterns stand out. First, linked images and icon buttons describe the action, not the picture: nobody needs to hear "magnifying glass", they need to hear "Search". Second, the same file can need different alt text in different places, which is why alt text belongs where the image is used, not baked into a media library and forgotten.
Decorative images and empty alt
Not every image needs a description. A decorative image is one that adds nothing a listener would miss: background shapes, dividers, a stock photo of a laptop next to a heading that already says everything, an icon beside a text label. For these, use an empty alt attribute:
<img src="/images/wave-divider.svg" alt="">
An empty alt and a missing alt are very different:
alt=""(empty) tells assistive tech the image is decorative. Screen readers skip it.- No alt attribute at all says nothing. Many screen readers then read the file name instead, so the listener hears something like "image, hero underscore final underscore v3 dot png". It is also an HTML validation error.
So every <img> should have an alt attribute: filled in when the image means something, empty when it does not. When you are unsure whether an image is decorative, ask whether the page would lose information without it. The W3C's alt decision tree on the WAI site walks through the same question for harder cases.
CSS backgrounds and SVG
- CSS background images cannot have alt text, so use them only for decoration. If a background image carries meaning, make it a real
<img>. Google also does not index images set in CSS. - Inline SVG icons that are decorative should get
aria-hidden="true". A meaningful inline SVG needsrole="img"and a label, such asaria-labelor a<title>element inside it. - SVG files used in an img tag follow the normal alt rules.
Charts, diagrams and screenshots full of detail
Some images carry more than a sentence can hold. For these, split the job:
- Short alt text that names the image and its main point: "Bar chart: signups by launch platform, Product Hunt highest".
- The full detail in the page, where everyone can read it: a paragraph that explains the finding, a data table under the chart, or a
<figcaption>.
This helps everyone, not just screen reader users. Readers who skim get the number in text, and search engines get crawlable text instead of pixels. The same rule applies to images of text, like a slide with five bullet points: put the text in the page, not only in the image.
Alt text for SEO: image search basics
Alt text is the most important single signal you control for an image, but Google uses several others. If image search matters to you (product screenshots, diagrams, original charts), get these right too.
| Factor | What to do |
|---|---|
| File name | Short and descriptive: invoice-reminder-settings.png, not IMG_0234.png. Google calls file names "very light clues", so it is a small win, but free. |
| Use an img element | Google indexes images in <img> elements, not CSS backgrounds. |
| Context | Place images near the text they relate to. Google reads the surrounding content, captions and headings to understand an image. |
| Format | Google supports BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. WebP and AVIF are usually smallest for photos and screenshots. |
| Responsive images | With srcset or <picture>, always keep a fallback src. |
| Size and speed | Compress images and set width and height so the layout does not jump while they load. Both feed into Core Web Vitals. |
| Lazy loading | Lazy load images below the fold, but not the main hero image, which should load as early as possible. |
| Discovery | Images that only load through scripts may be missed; an image sitemap can list them. |
The page speed checker shows page weight and caching, which is where oversized images usually show up.
Social share images
The image that appears when your page is shared on LinkedIn, X or Slack comes from the Open Graph og:image tag, not from an img element. It can have its own description in an og:image:alt tag. Our Open Graph tags guide covers the full set, and the Open Graph checker shows the card a URL will produce.
Where to add alt text in common tools
- HTML: the
altattribute on every<img>. - Markdown: the text in square brackets:
. - React and Next.js: the
altprop. Next.js's Image component requires it, and an empty string is the way to mark an image decorative. - WordPress, Webflow, Framer and most site builders: an alt text field in the image settings or media library. Remember to check it per use, not just once per file.
How to check alt text on a page
- Paste the page URL into the free image alt checker.
- It lists every image on the page with its alt text and flags images with missing or empty alt attributes.
- For each missing one, write a short description. For each empty one, confirm it really is decorative; an empty alt on a product screenshot is a mistake.
- Read the alt texts that are filled in. Watch for file names, "image", and keyword lists.
The checker looks at <img> elements in the page HTML; it does not see CSS background images, which cannot have alt text anyway. Alt text is one item in a full page audit: the on-page SEO checker reviews images together with titles, headings, links and schema, and our on-page SEO checklist lists everything to check before a page goes live. If your images sit under headings, the heading tags guide covers the other half of a clear page structure.
FAQ
What is alt text?
Alt text is the text alternative for an image, written in the alt attribute of the img element. Screen readers read it aloud, browsers show it when the image cannot load, and search engines use it to understand the image.
How long should alt text be?
Usually one short sentence. A common guideline is about 125 characters or less. There is no hard limit in HTML, but long alt text is tiring to listen to; put extra detail in the page text instead.
Should decorative images have alt text?
They should have an empty alt attribute, written alt="", so screen readers skip them. Do not leave the attribute out entirely, because some screen readers will then read the file name aloud.
Does alt text help SEO?
Yes. Google uses alt text, together with computer vision and the page content, to understand images, which affects whether they appear in image search. Linked images also pass their alt text as anchor text. Write it for people first and it will serve search too.
Should I put keywords in alt text?
Only when they truly describe the image. Google warns that filling alt attributes with keywords may cause a site to be seen as spam, and it makes the page worse for screen reader users.
What is the difference between alt text and the title attribute?
Alt text replaces the image for people who cannot see it. The title attribute shows as a tooltip on hover with a mouse, is not shown on touch screens, and is not reliably read by screen readers. Always write alt text; the title attribute is optional.
Topics
Written by
Devvrat Hans
Founder
By subscribing, you agree to get our newsletter by email. Unsubscribe any time in one click. See our Privacy policy and Terms.
Related Articles
301 Redirect Generator Guide: 301 vs 302, and Redirect Code for Apache, Nginx, Next.js and Cloudflare
How to use a 301 redirect generator, and when a 301 is the right redirect at all: 301 vs 302 vs 307 vs 308, copy and paste code for .htaccess, Nginx, Next.js and Cloudflare, and how to avoid chains and loops in a migration.
Bulk Domain Authority Checker: How to Compare Many Domains at Once (Free)
When to check domain authority in bulk, how to compare up to 20 domains at once for free, how to read and sort the results, and a link prospecting workflow with spreadsheet formulas.
Canonical Checker Guide: What a Canonical Tag Does and How to Check Yours
How to use a canonical checker, and what it is checking for: what rel canonical means, HTML and HTTP header examples, when to use a canonical tag, the mistakes that drop pages from Google and how to read Search Console's canonical reports.