+ 1
What is the use of "alt" attribute in <img>tag?
I am new in html, help me out please!
4 Respuestas
+ 4
When the image is taking too long to load or not loading, the text in alt attribute will display in the screen.
alt - - > alternative
For example:
<img src="image.png" alt="Image">
In case the image.png is not a valid file or still loading the "Image" text will be displayed.
For other answer, see this:
https://www.sololearn.com/Discuss/1155929/?ref=app
+ 3
alt is the attribute of <img> tag. This represents the alternative text that shows in place of the image if in case image is not loaded for some reason.
Example:-
<img src="tree.jpg" alt="This is tree" height=500 width=500 />
0
Ok