HTML alt attribute

HTML alt attribute defines alternative text when the image is not available. The image may not be available due to wrong address of image or network error.

<p>When the image is not visible in the browser due to wrong source</p>
<img src="files/web.png" alt="Here is image" width="300"/>
<img src="files/eb.png" alt="Here is image" />
</>

When the image is not visible in the browser due to wrong source

Here is image Here is image

Attribute values

All possible values of alt attribute

The value of alt attribute is simply plain text.

Related Tags

The tags that support alt attribute

<area> tag

If the image is not present in the linked area, then alternate text appears.

<img src="files/logo.png" alt="codingb logo" width="200" height="100" />

Try</>


Was this article helpful?

 

Email:

Message: