Alternative text (ALT) is an HTML attribute that essentially acts as a description of a web object for search engines and screen readers. It can be used on a variety of web elements, such as images and fields in a form.

ALT Text and the Browsing Experience

Humans generally never see ALT text, unless the element the text is assigned to is broken or not yet loaded. For instance, if an email client does not automatically load the images of new emails, recipients will probably see the image’s ALT text (if available) within the image’s placeholder box.

A screencap of Gmail, showing the ALT text of an unloaded email image.

Depending on users’ browser(s), ALT text may appear if hovering over the image or input field.

A screenshot showing an image's hover text, from the element's ALT attribute.

ALT Text and Web Crawlers (SEO)

Although ALT text is occasionally helpful for humans, its main benefit is explaining what a web object is to search engines and crawlers. For example, when Googlebot encounters a linked image on a web page, it can pull keywords from the image’s file name, but it otherwise has no idea what that image represents. ALT text is a site owner’s way of explaining that image to Google and making it searchable (not to mention any keywords in the ALT text count toward your page’s targeting.)

ALT Tag Keyword Stuffing / Black Hat SEO

It is strongly recommended that webmasters and content writers do not stuff the ALT attribute with unnecessary keywords, as it is considered a black-hat measure and not tolerated by Google. If excessive keywords are detected in link anchor text or ALT attributes of a web page, Google has been known to penalize the hosting domain through lower search rankings or outright deindexing.