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 trialSheryl Wood
1,204 PointsProblem with alt tag
Is there something wrong with this alt tag?
<img src="img/featured-cupcake.jpg" alt="Avacado Chocolate Cupcake">
6 Answers
James Barnett
39,199 PointsYou misspelled Avocado
as Avacado
.
enriquedealba
4,678 PointsHello Sheryl. I don't see any code in your post, but I am assuming you are referring to the alt
tags that accompany images (and probably other objects). If so, they are there for two main reasons:
- It makes the images searchable by a search engine like Google.
- It allows people with impaired vision who use screen readers to get an idea of what the image contains.
It will not create a caption or anything detectable with your browser.
Here's an example:
<img src="file.jpg" alt="strong horse galloping in grass field">
Hope this helps!
enriquedealba
4,678 PointsHello Sheryl. I don't see any code in your post, but I am assuming you are referring to the alt
tags that accompany images (and probably other objects). If so, they are there for two main reasons:
- It makes the images searchable by a search engine like Google.
- It allows people with impaired vision who use screen readers to get an idea of what the image contains.
It will not create a caption or anything detectable with your browser.
Here's an example:
<img src=file.jpg" alt="strong horse galloping in grass field">
Hope this helps!
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsAlt attributes should be added to images like so
<img src="image1.jpg" alt="This is the alt text" >
If that doesn't help post your code so we can take a look :)
Sheryl Wood
1,204 PointsThanks. I think there might be a problem with one of the tests I'm taking because I can't get past adding the alt tag. I've double-checked my code and it is correct. For now I just skipped over that part and might come back to it later. Thanks for your help!
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 Pointsthis thread was posted not long ago. Might be something to do with that?
Also, sometimes you need to refresh the page to get the editor to accept your answer, this can mean starting the challenge again which is a bit annoying.
Sheryl Wood
1,204 PointsSheryl Wood
1,204 PointsOh gosh, that's it! Thanks!!!