Why we use alt="" in image? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why we use alt="" in image?

if we doesn't want to place alt="", then what will do if error do.

10th Oct 2018, 6:29 PM
Gaurav Garg
Gaurav Garg - avatar
3 Answers
0
If the image cannot be loaded then no image will be displayed. The "alt" tag is also for accessibility though - people who cannot see and use a screen reading program to navigate your website will be read the "alt" text to describe your image. It's an accessibility-friendly feature
10th Oct 2018, 6:42 PM
Evan B
Evan B - avatar
0
Evan B i know this evan
10th Oct 2018, 6:44 PM
Gaurav Garg
Gaurav Garg - avatar
0
"alt" gets executed if the src fails to open due to an error when opening a png or if the img doest exist...
12th Nov 2018, 9:59 PM
Lucky Sebothoma
Lucky Sebothoma  - avatar