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 trial
Shanna Varela
1,999 PointsImage Tag Challenge Difficulty
I keep coming back to this challenge but for some reason I cannot figure out what I am doing wrong. I keep seeing that pop-up that tells me I need to add an image tag while leaving the alt blank. I thought I did that correctly. Would appreciate feedback. The code I have written out is below. Thank you for your help!
<ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> </li> </ul>
2 Answers
Maxwell DeMers
6,853 PointsI noticed that you didn't close your anchor tags. By doing so, you will make each img element a link. I believe you leaving the alt attribute blank is correct, but I think you just need to close your anchors. Should be like this
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
</a>
</li>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
</a>
</li>
<li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
</a>
</li>
Shanna Varela
1,999 PointsThank you so much for your help! When attempting to close my anchor tags by placing them under the img src as you did, it still said I was wrong. So, I moved the anchor tags along the same line as "a href" and it worked!
<ul>
<li>
<a href="img/numbers-01.jpg"> </a>
<img src="img/numbers-01.jpg" alt="">
</li>
<li>
<a href="img/numbers-02.jpg"> </a>
<img src="img/numbers-02.jpg" alt="">
</li>
<li>
<a href="img/numbers-06.jpg"> </a>
<img src="img/numbers-06.jpg" alt="">
</li>
</ul>