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

Josh Riggs
Josh Riggs
237 Points

Hello! 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
Wayne Priestley
19,579 Points

Hi 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

Hi 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
Josh Riggs
237 Points

Ah! Thank you so much :)

No problem. Happy to help.

-Rich

Jo Greenwood
Jo Greenwood
4,416 Points

I 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
Josh Riggs
237 Points

Thanks, Jo!