What Are Image Alt Tags?

Dan Gold

Written by Dan

An alt tag (alternative text) is an attribute added to an image to provide a textual alternative to the image for visually impaired users and search engine crawlers. The alt tag also allows you to specify keywords for your image, which can help improve your site’s ranking in search results.

In HTML, the alt tag is written as follows:

<img src="image.jpg" alt="A picture of a fluffy dog" />

Where image.jpg is the location of the image file and A picture of a fluffy dog is the text that will be displayed in place of the image if it cannot be loaded or if a user has turned off images on their device.

Last updated

November 8th, 2022