Alt text is the short written description attached to an image in HTML. It sits inside the image’s alt attribute and gives people, browsers, and search systems a text alternative when the image cannot be seen or loaded.
Good alt text does not exist just for SEO. It makes images easier to understand for screen reader users, gives browsers replacement text when an image fails, and gives search engines more context about the image and the page around it.
The best way to think about it is simple: every image deserves an alt decision. Some images need useful descriptive text. Some decorative images need empty alt text so assistive technologies can skip them.
What is alt text?
Alt text, short for alternative text, is the text alternative for an image. If someone cannot see the image, the alt text should give them the same useful meaning the image gives a sighted reader.
That does not always mean describing every visible detail. It means describing the image’s purpose in its specific context.
For example, if an article about blogging includes a stock photo of a person typing on a laptop, the alt text does not need to describe their clothing, the desk colour, or every object in the background. A useful version could be:
Person writing a blog post on a laptopThat description is short, relevant, and useful. It tells the reader why the image is there.
Alt text vs alt attribute vs alt tag
People often use “alt text,” “alt attribute,” and “alt tag” to mean the same thing. They’re related, but they are not exactly identical.
- Alt text is the actual wording that describes the image.
- Alt attribute is the HTML attribute that holds that wording.
- Alt tag is common shorthand, but it is not the technical term. The image itself uses an
<img>tag, and the alternative text lives inside thealtattribute.
If you’re talking with clients, writers, or marketers, “alt text” is usually the clearest term to use.
What alt text looks like in HTML
A basic image in HTML looks like this:
<img src="bike.jpg">Once you add alt text, it looks like this:
<img src="bike.jpg" alt="Person riding a blue bike on a city street">The src attribute tells the browser which image file to load. The alt attribute provides the text alternative.
You do not need to write HTML manually in most content management systems. In WordPress, for example, the Image block and Media Library both include fields for alternative text. The HTML still exists behind the scenes; WordPress just gives you a simpler way to edit it.
Why alt text matters for accessibility
Alt text is one of the simplest accessibility improvements you can make on a website. Screen readers can announce it so people who are blind, have low vision, or cannot view images in the usual way can understand what the image communicates.
W3C’s Web Content Accessibility Guidelines include text alternatives under the “Non-text Content” success criterion. The key idea is that non-text content should have a text alternative that serves an equivalent purpose, with specific exceptions for cases like decorative content.
That last part matters. A decorative image does not need a poetic description. If it adds no meaning and has no function, it should usually have empty alt text:
<img src="divider.png" alt="">Empty alt text tells assistive technologies to skip the image. Missing alt text can create a worse experience because some screen readers may announce the file name instead.
Why alt text matters for SEO
Alt text gives search engines extra context about an image. Google’s image SEO guidance says it uses alt text along with computer vision and the surrounding page content to understand the subject matter of an image.
That does not make alt text a keyword dumping ground. Google also warns against filling alt attributes with keywords because it creates a poor user experience and may make a page look spammy.
Use keywords only when they naturally describe the image and match the surrounding content. If you have to force the keyword into the sentence, it probably does not belong there. For a broader approach, pair this with thoughtful keyword optimization and strong SEO copywriting.
How to write good alt text
Good alt text is useful, specific, and tied to the page it appears on. The same image can have different alt text on different pages because the context changes.
Start by asking one question: what would someone miss if they could not see this image?
If the image supports the content, describe the useful meaning. If the image is a link or button, describe the action or destination. If the image is decorative, leave the alt text empty or mark it as decorative in your editor.
- Describe the purpose, not every pixel. Write what the image communicates in this context.
- Keep it concise. A short, specific phrase is usually better than a long sentence.
- Use keywords naturally. Add the keyword only if it accurately describes the image.
- Skip “image of” or “picture of” in most cases. Screen readers and browsers already know it is an image.
- Do not repeat nearby text word for word. If the same information is already visible beside the image, empty alt text may be better.
- For linked images, describe the destination. A logo linking to your homepage could use
alt="Tech Help Canada home". - For complex charts or diagrams, put the detail in the page content. Use alt text to identify the image, then explain the data in nearby text, a caption, or a table.
Alt text examples
The easiest way to learn alt text is to compare weak descriptions against stronger ones.
| Image context | Better alt text | What to avoid |
|---|---|---|
| A blog post image showing a person typing on a laptop | Person writing a blog post on a laptop | blogging blog tips blog writing SEO blog strategy |
| A product photo of a blue ceramic coffee mug | Blue ceramic coffee mug with curved handle | mug or best coffee mug cheap mug blue mug |
| A decorative divider between two sections | alt="" | decorative divider line if the image adds no useful meaning |
| A company logo linking to the homepage | Tech Help Canada home | logo |
| A chart in a report about monthly traffic | Chart comparing monthly website traffic by channel | Trying to fit every number from the chart into the alt text |
What to do with complex images
Some images carry too much information for a short alt attribute. Charts, infographics, maps, technical diagrams, screenshots with many interface details, and process visuals often need more than one line of alt text.
Do not try to cram everything into the alt attribute. A short identifier plus a proper explanation in the page content is usually easier for everyone to use.
For a complex chart, the alt text might say:
Chart showing website traffic by channel for 2026Then the page copy, table, or caption should explain the actual data. This gives screen reader users the useful information without forcing them through an oversized alt attribute.
Older SEO tutorials sometimes recommended the longdesc attribute for longer image descriptions. Current MDN guidance treats longDesc as deprecated and notes that the related HTML attribute is considered obsolete. For most websites, visible supporting copy, a caption, a data table, or a clearly linked description is the better route.
How to add alt text in WordPress
WordPress lets you add alt text without touching code.
In the block editor, select an Image block and open the block settings. Under the Content tab, use the Alternative text field to describe the image or mark it as decorative if it adds no meaningful information.
You can also add alt text in the Media Library. WordPress documentation notes that adding alternative text in the Media Library sets the default alt text when you insert that image elsewhere. If you edit alt text directly inside an Image block, that edit applies to that specific image on that page or post.
For older pages, check the page itself. Do not assume a Media Library update fixed every already-published image. Open the post, select the image, and confirm the alt text used in that exact block.
How to audit alt text on existing pages
If your site has years of published content, do not start by editing images at random. Start with pages that already matter: high-traffic posts, service pages, product pages, landing pages, and posts that bring in image search traffic.
Look for four common problems:
- Missing alt attributes on meaningful images.
- File names used as descriptions, such as
IMG_4821.jpg. - Keyword stuffing that makes the alt text sound unnatural.
- Repeated alt text across different images that do not show the same thing.
After you fix the highest-value pages, build alt text into your publishing workflow. It is much faster to write one useful description when you upload an image than to repair hundreds later.
A practical alt text checklist
Before publishing an image, run through this quick checklist:
- Does this image add meaning, function, or useful context?
- If yes, does the alt text describe that meaning clearly?
- If no, is the image marked decorative or given empty alt text?
- Does the wording make sense when read with the surrounding sentence or heading?
- Is the description specific without being overloaded?
- Are keywords included only when they fit naturally?
- If the image is a chart, map, or infographic, is the detailed explanation available in nearby content?
Alt text is a small field, but it has a real job. Write it for the person who cannot see the image first. Search engines benefit from that clarity too.
If you’re improving on-page SEO across a site, alt text is one piece of the larger system. Review your title tags, meta descriptions, headings, internal links, and image context so each page is easier for both readers and search systems to understand.
Frequently asked questions
Is alt text the same as an alt tag?
Not exactly. Alt text is the wording that describes the image. The alt attribute is the HTML attribute that stores that wording. “Alt tag” is common shorthand, but the technical term is alt attribute.
How long should alt text be?
Alt text should be as long as needed to describe the image’s purpose and no longer. A simple image may need only a few words. A complex chart or diagram should usually be explained in nearby page content instead of being squeezed into the alt attribute.
Do decorative images need alt text?
Decorative images usually need empty alt text, such as alt="", or should be marked as decorative in your editor. This tells assistive technologies to skip images that do not add useful meaning.
Should every image alt text include a keyword?
No. Use a keyword only when it accurately describes the image and fits the page context. Keyword-stuffed alt text is bad for users and can make the page look spammy to search engines.

Gabriel Nwatarali is the founder of Tech Help Canada and has worked in SEO, copywriting, and web strategy since the early 2000s. His work has helped drive more than 10 million app downloads and 2,900% organic traffic growth for startups, agencies, and brands across North America. He writes about SEO, marketing, AI, and the decisions that shape how businesses grow online, drawing on hands-on experience building websites, content systems, and digital strategies.






