+ 2
What is alt
please anyone give me the correct answer I am beginner so please help
4 Réponses
+ 6
Stuff you see when the image fails to load.
+ 2
That is how you determine what will be shown if the picture can't be loaded for some reason (slow connection, mistake in name or extension...). For instance, if you write <img src="Zoka&Ela.jpg" alt "two cats"/>, the text "two cats" will appear if the picture of Zoka and Ela is unavailable.
0
@jpqz, as I'm a beginner I don't understand
if I remove " alt" tag from the first image " code line" why there isdifference in both the output
<html>
<head>
<title>first page</title>
</head>
<body>
<img src="http://www.sololearn.com/images/tree.jpg"
height="150px" width="150px" alt="" />
<br />
<img src="http://www.sololearn.com/images/tree.jpg"
height="50%" width="50%" alt="" />
</body>
</html>