How to add alt text

Where the alt text field lives in the tools you actually use. Need the words first? Write them with the alt text generator, or the social mode of the image describer.

HTML

  1. Add the alt attribute to the img element.
  2. Use alt="" for decorative images, never omit the attribute.
<img src="teapot.webp" alt="Sage-green ceramic teapot" width="800" height="600">

Platform auto-alt is a starting point

WordPress plugins, Facebook and Microsoft Office can generate alt text automatically. It usually names objects ("May be an image of 1 person, bicycle and street") without knowing why you posted the picture. Replace it with a sentence about what matters, following the best practices.

Check it worked

After publishing, run the page through the alt text checker, or right-click the image and inspect it: the alt attribute should contain your text.

Questions people ask

How do I add alt text in WordPress?

In the block editor, select the Image block and fill in "Alternative text" in the block settings sidebar. In the Media Library, open the image and use the "Alternative Text" field. The Media Library value is used when you insert the image later, but changing it does not update images already placed in posts.

How do I add alt text on Instagram?

When posting, tap "Advanced settings" (or "Accessibility" in newer app versions) before sharing, then "Write alt text". For an existing post, tap the three dots, choose Edit, then "Edit alt text" on the image.

How do I add alt text in Markdown?

Put it in the square brackets: ![Sage-green ceramic teapot](teapot.webp). Empty brackets produce alt="", so leave them empty only for decorative images.

How do I add alt text in Shopify?

In the admin, open the product, click the image, and choose "Add alt text". Themes then output it as the alt attribute. Each product image can have its own alt.