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

Can't get Image tags to work?

Can someone tell me what is wrong with my code?

I can't get past a challenge as it keeps saying that I need to add Image tags I went through the video and it has not helped me.

Any assistance would be appreciated.

Thanks!

Could you include the code?

Please in order for me to help I need you to insert your code, the comment above doesn't really help out.

   <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>

2 Answers

Hi Bryce,

You are really close. All you need to do is remove your anchor tags:

 <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>

I hope that helps.

We had to use the anchor tags in the video... maybe I'm confused. But what is the difference?

In order for the image gallery to work correctly you would use the anchor tags. The anchor tags allow the user to view the image on a separate page. However this challenge only wants the image tags inside the list tags. This will only show all the images(They will not go to a separate page).

Ok, that makes sense. Thank you so much for the explanation.