Horje
How to create HTML The alt Attribute for Image

The required alt attribute provides an alternate text for an image, if the user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader).


Full Example of HTML The alt Attribute for Image

The value of the alt attribute should describe the image:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Alternative text</h2>

<p>The alt attribute should reflect the image content, so users who cannot see the image get an understanding of what the image contains:</p>

<img src="https://itupto.com/avatar.png" alt="Flowers in Chania" width="460" height="345">

</body>
</html>

Output should be:

Full Example of HTML The alt Attribute for Image





Category:
Web Tutorial
Sub Category:
HTML Images
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference