How to add alt text changes from one tool to the next, but every platform has the same idea underneath: a field labelled Alt text or Alternative text that fills the alt attribute of the image. In raw HTML you type it yourself as alt="..."; in a content system or office app you find the field in the image settings.
Below are the exact steps for HTML, WordPress, Shopify (including bulk edits), Microsoft Word, PowerPoint, Google Docs, email tools and Tailwind projects. Menu names shift between versions, so if a label differs slightly, look for the closest match. For what to write in the field, see writing alt text.
Quick facts
HTML
<img src="..." alt="...">Decorative images
Empty alt,alt="", with no spaceWordPress
Alternative Text field in block settings or the Media LibraryWord and PowerPoint
Right click the picture, View Alt TextLength
One or two short sentences, about 125 characters as a soft targetWCAG rule
1.1.1 Non-text content, Level A
Image alt text in HTML
The alt attribute goes on every img element. A missing attribute is a failure of WCAG 1.1.1 because many screen readers then read out the file name. An empty one tells them to skip the image.
Fails: no alt, so the file name may be spoken.
<img src="team-photo-03.jpg">Passes: informative image with a short description, and a decorative divider skipped.
<img src="team-photo-03.jpg" alt="Our four nurses at the clinic front desk">
<img src="divider.svg" alt="">For a linked image or an image button, describe its destination or its action, such as alt="Home page", not the picture. Inline SVG icons need role="img" with an aria-label, or a title element. A picture set as a CSS background offers no place for alt text, so never use them for content that matters.
How to add alt text to images in WordPress
WordPress image alt text can be set in two places, and they behave differently.
- In the block editor, select the Image block. In the settings sidebar on the right, find Alternative Text and type your description.
- Or open Media, Library, click an image and fill the Alternative Text field in the attachment details.
- Update or publish the post.
Text you set in the Media Library becomes the default for future inserts. It does not always change images already placed in older posts, which keep the alt they had when inserted. Fix those in each post, or with a bulk tool that edits post content.
Page builders and themes add their own image widgets, but nearly all of them show an alt field in the widget settings or read it from the Media Library.
Shopify: single images and bulk edit alt text
For one product image, open Products, choose the product, select the photo under Media, then use Add alt text or Edit alt text. Save. Collection images, blog post images and theme sections have a similar alt field in their own settings.
For a large catalog, a spreadsheet is faster than clicking each image:
- From Products, Export, export the products you want as a CSV file.
- Open it in a spreadsheet program and find the Image Alt Text column. Each image has its own row.
- Write alt text per image. Avoid one formula that pastes the product title into every row; gallery shots need different descriptions.
- Import the file through Products, Import and choose to overwrite existing products.
Test the import on a few products first and keep a backup of the original export. Shopify apps for bulk alt text exist too; review anything they write automatically before publishing.
Alt text in Word and PowerPoint
Microsoft Word and PowerPoint share the same panel:
- Right click the picture, chart or shape.
- Choose View Alt Text (older versions say Edit Alt Text).
- Type the description in the pane that opens.
- For decoration, tick Mark as decorative instead.
Office may suggest an automatic description. Treat it as a draft: it often names objects but misses why the image is there. Alt text you set in Word carries into a PDF when you export with document structure tags turned on; our PDF alt text guide covers what happens next. Outlook uses the same right click route for images in an email.
Google Docs, Slides and Sheets
Right click the picture, pick Alt text, or select it and press Ctrl+Alt+Y (Cmd+Option+Y on Mac). Type the description and click OK. Google Slides and Sheets use the same menu item for images and charts. There is no decorative checkbox, so leave the field empty for purely visual pictures.
Email builders and newsletters
Many email programs block images until the reader allows them, so alt text is often the first thing a subscriber sees. Most newsletter builders put an Alt text or Alternate text box in the image block settings. If yours does not, edit the HTML block and add the attribute by hand.
- Put the offer or headline from a banner image into its alt text, since it may be the only way the message gets through.
- Use
alt=""on spacer and divider images so they are not read as file names. - Do not put the whole email inside one image.
Tailwind and framework projects
Tailwind classes only style the image. Alt text is still the plain HTML attribute:
<img class="w-full rounded-lg object-cover"
src="/img/cafe.jpg"
alt="Window seats with a view of the harbour">In JSX frameworks the prop is also alt, and some image components refuse to build without it. For visible icons that need a text label only for screen readers, Tailwind's sr-only class hides text visually while keeping it readable:
<button type="button"><svg aria-hidden="true">...</svg>
<span class="sr-only">Close</span></button>Check your work after you add alt text
| Where | How to check |
|---|---|
| Any web page | Right click the image, Inspect, and look for the alt attribute |
| A whole page | Copy its HTML and paste it into our checker tool |
| Word, PowerPoint | Run the built in accessibility checker from the Review tab |
| Shopify catalog | Export products and filter for empty Image Alt Text cells |
| WordPress | Open the Media Library list view and look for blank alt fields |
Not sure what to type? The alt text generator suggests wording from what you tell it, and alt text examples show good and bad versions side by side. Unsure whether an image needs text at all? Follow the W3C image decision flowchart.
Questions people ask
What is the HTML for image alt text?
Add an alt attribute to the img tag, for example alt followed by a short description in quotes. For decorative images, leave the attribute present but empty. Every img element should have the attribute, even when it is empty.
How do I add alt text in Word?
Right click the picture and choose View Alt Text, then type in the pane. Tick Mark as decorative if the picture adds nothing. The same steps work in PowerPoint and Outlook.
Can I bulk edit alt text images in Shopify?
Yes. Export products as CSV, fill the Image Alt Text column for each image row, then import with overwrite turned on. Try a small batch first and keep the original file.
Why does my WordPress image alt text not update in old posts?
The Media Library value is copied into a post when you insert the image. Changing it later does not rewrite older posts, so edit the image block in each post.
Does Tailwind have its own alt text setting?
No. Tailwind only provides classes for styling. Write the alt attribute on the img element as usual, and use the sr-only class for hidden labels on icon buttons.
Should alt text include keywords?
Only when they describe the image naturally. Stuffing keywords harms people who rely on screen readers and can be treated as spam; see alt text for SEO for more.