An ALT attribute (also called an ALT text or, incorrectly, ALT tag) is an obligatory component of an image tag <img>. It’s information that you should use in your website’s HTML code to describe what an image is about.
If your website’s visitor is using a screen reader, has disabled all images, or is visually impaired, he or she will be able to understand what the image represents thanks to this attribute.
ALT attributes are also crucial for search engine crawlers to understand what your website is about and whether or not it’s relevant. Crawlers do not understand images the way people do; when they encounter an image, they can only read the site’s HTML code.
See this example below.
what you see:
what a robot sees:
<img src=”picture.jpg” alt=”Positionly logo”>
By using ALT attributes, you make it easier for the crawlers to index your site and place it higher in the search engines. The higher you are in the SERPs, the more visitors come to your site.
Effective ALT attributes will have a positive impact on your SEO. Not only will you be making your website more accessible for visitors, but your visibility in image results will also increase. Your overall visibility will be higher; which is great for your bottom line!
As part of an image tag, ALT attributes are used along with the source attribute . An exemplary code for the image attribute should look similar to the one below:
<img src=”http://yourdomain.com/photo.jpg” alt=”the description of the photo”/>
Between the two attributes, you should insert a space. The value of those attributes should be written in double quotation marks.
A correctly written ALT attribute needs to be:
An ALT attribute is required for an image tag. According to the W3C standards, every image should have an ALT attribute, even if it’s just a decorative element. If it is a decorative element, simply leave the value as an empty string.
If you have a lot of images to add ALT attributes to, do the following: