Alt text, often times incorrectly called “alt tags”, is also called “alt attribute” or “alt description”. Alt text is important because it is the HTML code used to describe an image or video on your page. Good alt text should tell the user both the function and description of the given image or video.
It is primarily used to provide understanding for visually impaired users that may be using screen readers as they browse.
Secondly, it serves as replacement content if the image doesn’t load properly.
Finally, if well done, it provides a more in depth description of why that content is being used. This results in being in the good graces of search engines through image indexing.
Alt text examples:
img src="computermouse.jpg" alt=""
img src="computermouse.jpg" alt="Computer Mouse"
img src="computermouse.jpg" alt="This is a computer mouse"
img src="computermouse.jpg" alt="The Comfort Mouse 200 will keep your wrist comfortable longer"