+ 2

What is alt

please anyone give me the correct answer I am beginner so please help

5th Jan 2017, 11:32 AM
yash shukla tech.
yash shukla tech. - avatar
4 Réponses
5th Jan 2017, 11:33 AM
Alex
Alex - avatar
+ 6
Stuff you see when the image fails to load.
5th Jan 2017, 12:18 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 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.
5th Jan 2017, 8:54 PM
jpqz
jpqz - avatar
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>
2nd Mar 2017, 6:09 PM
romil chhaperwal
romil chhaperwal - avatar