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





Related Articles
What is HTML Images HTML Images
How to create HTML Images Syntax HTML Images
How to create The src Attribute for Image HTML Images
How to create HTML The alt Attribute for Image HTML Images
How to create Image Size - Width and Height HTML Images
How to create HTML Image Width and Height with CSS Style HTML Images
How to create HTML Images in Another Folder HTML Images
How to create HTML Images on Another Server/Website HTML Images
How to create HTML Animated Images HTML Images
How to create HTML Image as a Link HTML Images
How to create HTML Image Floating HTML Images

Single Articles
Full Example of HTML The alt Attribute for ImageHTML Images

Read Full:
HTML Images
Category:
Web Tutorial
Sub Category:
HTML Images
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
60


Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_images_alt_chania

Share on: