ALT text is alternative text which should be associated with an image on a website. Web browsers and search engines cannot see what is in the image. They need an attribute which explains to them what the image in context might be referring to.
Attaching an ALT text to an image is very useful when the end-user is using accessibility options, screen readers. Their browsers may not able to load the image for some reason. ALT texts are inserted using img tags in the HTML code of the web site using the following syntax:
<img src=”yourimagename.jpg” alt=”description of the image”>
For example, if you have an e-commerce store selling shoes and the product image is a blue Adidas shoe, you can add text to the image in the HTML code which looks like:
<img src=”adidasblueshoe.jpg” alt=”Adidas shoe, blue, US size 10”>
This will create an understanding that the image is about a blue Adidas shoe of size 10 (US standard).
ALT texts are very important when considered from the Search Engine Optimization (SEO) perspective. As Google and other search engines can’t see what is the content of the image, they use ALT texts to know that the image is in the relevant context and sticks to the overall theme of your web site.