What is an ALT Attribute?
ALT attribute (or simply ‘alt’) is the HTML attribute used in HTML and XHTML to specify alt text (alternative text). This alternative text is employed when the intended audience cannot interact with the element it is meant to represent. In SEO, alt text is often applied to images.
More About ALT Attributes
When a visitor cannot interact with a certain web element, such as an image, alt attributes (alt text in particular) can be useful. For example, a vision-impaired visitor may not be able to see an image or video, but an audio device can dictate its alt text to them. This same visitor would not be able to see a vibrant yellow ‘warning’ icon that appears as an image, while useful alt text might simply read: “Warning!”
In a nutshell, an alt attribute is meant to replace a web element (in other words, serve as its alternative). It is usually descriptive, but it doesn’t have to be.
Alt attributes also play a key role in SEO. This is because search engine bots cannot see images on web pages, but they can read alt text. When you include alt text for your visual media, you can simultaneously make your content more accessible and improve your search engine rankings.