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

HTML How to Make a Website Creating HTML Content Organize with Unordered Lists

Jeff Haseltine
PLUS
Jeff Haseltine
Courses Plus Student 6,364 Points

Challenge 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>
Dalton Casey
Dalton Casey
19,881 Points

Hi Jeff,

Were the anchor tags supposed to be wrapped around the images?

Richard Duncan
Richard Duncan
5,568 Points

I 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
Dalton Casey
19,881 Points

Jeff,

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
James Ingmire
11,901 Points

Hi 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
PLUS
Jeff Haseltine
Courses Plus Student 6,364 Points

Getting rid of the anchors was the answer, thanks a lot everyone.