Alt text
Alt text is the alt attribute of an image: the text shown or read when the image cannot be seen. It exists for accessibility first, and search also reads it. If you run a small site, writing accurate alt text is quick and prevents basic SEO and usability misses.
By Théophile Louvart, founder of Porteur · Updated 14 September 2026 · Markdown
What alt text is for
Write alt text to describe what the image shows to someone who cannot see it. Screen readers read it. If the image fails to load, the browser shows it. When an image is a link, the alt text acts as the anchor text. Google Images and the crawler also read it, along with the surrounding text and the file name.
How search reads alt text
Google treats alt text as one hint about the image. It does not replace the page copy. The words around the image help search understand context. The file name helps too: pricing-comparison.png is clearer than IMG_1234.png. Do not stuff keywords. It reads as spam and does not help.
If an image links to a page, the alt text is the anchor text of that link. For a logo that links to the homepage, use alt="YourProduct home" rather than alt="" if it is the only label for the link.
How to write good alt text
Describe what is essential
Say what matters in context. On /pricing, alt="Plan tiers table highlighting Pro" beats "table".
Be specific, be brief
Aim for a short phrase or a simple sentence. Avoid “image of” or “photo of” unless it changes meaning.
Match the page task
On /guides/getting-started, alt="Connecting Stripe in Settings" helps. On /blog/launch, alt="Team at laptops" is enough if the image is illustrative.
Name linked purpose
If the image is a link, describe the destination or action: alt="Download PDF setup guide".
Use helpful file names
Rename product-shot-blue-mug.jpg instead of IMG_4550.jpg. Keep hyphens, keep it short.
A fixed page reads cleanly with a screen reader and the images help the story. Example on /features: alt="Dashboard showing weekly active users chart" next to copy about product usage.
Decorative images and empty alt
If an image adds no information, give it an empty alt: alt="". This tells screen readers to skip it. Common cases: background flourishes, spacer graphics, generic dividers.
Do not use empty alt on informative graphics. Charts, diagrams, UI screenshots and product photos need alt that conveys their point on the page.
How to check and measure
- Run a Lighthouse accessibility audit. It flags images without alt.
- Spot check key pages. Right click, Inspect, select the image, and read the alt attribute.
- Preview with a screen reader workflow you know, or use the browser’s reader features to sanity check flow.
- List images in your codebase or CMS and add missing alt before you ship new pages.
Questions
It is the alt attribute of an image. Screen readers read it, browsers show it when the image cannot load, and search uses it to understand the image.
On a product page, alt="Blue 12 oz mug on a desk" is good. It is specific, short and matches the page. Avoid “photo of” and avoid keywords that are not in the image.
Edit the image element and set the alt attribute. In HTML: <img src="mug.jpg" alt="Blue 12 oz mug on a desk">. Most CMS editors expose an Alt text field beside the image upload.
There is nothing to turn on in the browser. You add the alt attribute in your HTML or CMS. For audit, run Lighthouse and fix any images that it flags as missing alt.
It can help, but only when it accurately describes the image. Search also reads the surrounding text and the file name. Do not stuff keywords.
Yes. If it is a link to the homepage, write alt that names the destination, such as "YourProduct home". If the logo is purely decorative and not a link, alt="" is fine.
Sources
Check my site, free
Give us a URL and we will check how your images read in context, then show three findings on missing or weak alt text in about thirty seconds, free.
- Free check, no card
- Read-only, your own accounts
- Readable by your agent
Read next
- GuideOn-page SEO checklist: the twelve things on the page
- GuideImage optimisation for page speed: the hero image and everything below it
- GuideReading a Lighthouse score on a phone
- GuideHow to read PageSpeed Insights: field data first, then the score
- GlossaryAnchor text
- GlossaryHeading tags
- GlossaryImage SEO
- GuideHow to write an FAQ page people actually read