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 trialJosh Riggs
237 PointsHello! I'm on step 2 of the challenge, and I'm not sure what is incorrect about the code I've written.
The help message says "Make sure you include an image tag that displays "img/numbers-01.jpg". Below is what my code looks like:
<section> <ul> <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> </ul> </section>
I appreciate any help you can offer!
Wayne Priestley
19,579 PointsHi Emma,
You need to give your answer in the answer box and not the add comment box for your answer to be voted up or given the best answer.
:)
2 Answers
Rich Bagley
25,869 PointsHi Angela,
Your code is correct but for the challenge it's only asking for the image tag without any alt tags, etc:
Inside the three new list items, add the following images from inside the img folder: "numbers-01.jpg", "numbers-02.jpg", and "numbers-06.jpg". Leave the alt attributes blank, and donβt add any captions or links. Just the images!
It should therefore look like this to pass:
<section>
<ul>
<li><img src="img/numbers-01.jpg"></li>
<li><img src="img/numbers-02.jpg"></li>
<li><img src="img/numbers-06.jpg"></li>
</ul>
</section>
Hope that helps.
-Rich
Josh Riggs
237 PointsAh! Thank you so much :)
Rich Bagley
25,869 PointsNo problem. Happy to help.
-Rich
Jo Greenwood
4,416 PointsI think that it is because it is looking for the anchor element wrapping the < li >.
<a href="img/numbers-01.jpg">
<li><img src="img/numbers-01.jpg" alt=""></li>
</a>
I seem to remember that it didn't care that I put the alt attribute in.
Best of luck
Jo
Josh Riggs
237 PointsThanks, Jo!
Emma Willmann
Treehouse Project ReviewerEmma Willmann
Treehouse Project ReviewerYou've included a anchor tag (<a>) in each list item. You only need the <img> tags.