![]() |
The “alt” attribute in the <img> Tag is important for making websites more accessible. It stands for “alternative text” and is used to describe what an image is about. If the image can’t load, this text shows up instead. It’s also helpful for people who use screen readers because they can hear this description, making the web more inclusive for those with visual impairments. Purpose of
|
<!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title >Image alt attribute</ title > < style > img { margin: 10px; } </ style > </ head > < body > < img src = "#" alt = "Image not loaded" > </ body > </ html > |
Output:
Reffered: https://www.geeksforgeeks.org
HTML |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |