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 trialJulian Williams
1,022 PointsWhat's the purpose of alt="Joy"?
What's the purpose of alt="Joy"? I can't see what it does... (I omitted it as an experiment and it didn't seem to make any difference.)
2 Answers
William Li
Courses Plus Student 26,868 PointsHi, Julian Williams
In HTML, the alt attribute adds text info to the image, and you're correct that visually it makes no difference because that alt text associated with the image doesn't get displayed; however, for people who are visually impaired that rely on screen reader to read the web page, alt info helps them understand what the image is all about, and generally speaking, it's recommended that you include alt attribute for images when coding a website for better accessibility.
For more info on alt attribute, check out this page.
Hope this helps, cheers.
Julian Williams
1,022 PointsMany thanks, William. Appreciated.