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 trialJeff Haseltine
Courses Plus Student 6,364 PointsChallenge task 2 of 2 on Web Design
Can not get past the check on this bit of code (below) for the Challenge task 2 of 2 on Web Design. I'm suppose accomplish the following:
"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!"
The error I'm getting states "Bummer! Make sure you include an image tag that displays "img/numbers-01.jpg"."
Here is my code:
<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>
Richard Duncan
5,568 PointsI would guess its something to do with the first challenge task not being correct since you added the images for task 2.
3 Answers
Dalton Casey
19,881 PointsJeff,
I went ahead a looked at the challenge. You added anchor tags around the images, which was not apart of the challenge. Remove the anchor tags so your code looks like this.
<ul>
<li><img src="img/numbers-01.jpg" alt=""></li>
<li><img src="img/numbers-02.jpg" alt=""></li>
<li><img src="img/numbers-06.jpg" alt=""></li>
</ul>
James Ingmire
11,901 PointsHi Jeff, you have added the images inside the anchor tags. You need to remove the <a> tags as they are not part of the <img> tag. Anchor tags create a link.
<section>
<ul>
<li>
<img src="img/numbers-01.jpg" alt="">
</li>
<li>
<img src="img/numbers-02.jpg" alt="">
</li>
<li>
<img src="img/numbers-06.jpg" alt="">
</li>
</ul>
</section>
Jeff Haseltine
Courses Plus Student 6,364 PointsGetting rid of the anchors was the answer, thanks a lot everyone.
Dalton Casey
19,881 PointsDalton Casey
19,881 PointsHi Jeff,
Were the anchor tags supposed to be wrapped around the images?