Skip to main content

Alt Text

The Alt Text or Alternate Text is a piece of text used to describe the contents of the image. It is specified with the help of the Alt attribute used in HTML and XHTML documents. As the name suggests itself, Alt Text is shown in place of the image to help an user understand the contents of the image.


<img alt="Joker with red nose"src="">
<img alt="children playing"src=""> 
<img alt="Rose"src=""> 
<img alt="tiger"src=""> etc.

In the  examples given above, the Alt attribute defines the appropriate alt text with respect to the image.

Benefits of Alt attribute

1- It helps a blind person read and understand the contents of the image with the help of a screen reader.
2- It helps the search engines to interpret the contents of the image and use it for judging the relevance of the image.
3- It helps the user to identify the image content in case the browser is not able to load the image properly.