Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialsukhvinder singh
887 Pointsafter giving source of image what is work of alt="name" ?
when i do make changes in alt="name". that doesn't make any changes to the result. so what alt attribute do there?
1 Answer
Jason Anders
Treehouse Moderator 145,860 PointsHey there,
alt
stands for "alternative" and is used for two main reasons.
Many people have auto-loading for images disabled in their browsers, so when the image doesn't load (or can't load) the "alternative text" you provide is what will be displayed instead of the image. So, the users may not see the image, but they will see what the image is about.
For screen readers used by the visually impaired. A screen reader will use the "alternative text" to provide an audio description of the image.
So, both those are the reason you use the alt
, and both those show why it is very important to provide a short but specific description in the alt
attribute.
Hope that clears it up for you.
sukhvinder singh
887 Pointssukhvinder singh
887 Pointsthanks a lot jason.