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

Image tag

I am told during challenge questions to ensure I add an image tag. But I believe my code includes it. Any thoughts on what I am missing? <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>

can we see what you have?

7 Answers

Santiago Posada
Santiago Posada
5,189 Points

The image tag should go like this:

<img src = "name of the folder/name of the file" alt "description if you want" >

In this example you should create first and UL and three LI items that should be your image gallery using the names of the project filesit should work like this

<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>
Shana Gibson
Shana Gibson
8,788 Points

does your image tag look something like this

<img src="example.png" alt="Example">

Thanks Shana and Colby. I realized my mistake, I was adding an anchor tag to the image source. No need to do that, just should have kept it with the HREF.

Thanks Again!

Thanks Shana and Colby. I realized my mistake, I was adding an anchor tag to the image source. No need to do that, just should have kept it with the HREF.

Thanks Again!

Santiago Posada
Santiago Posada
5,189 Points

really glad I could help you keep it up!

on a related note, i tried copying and pasting the code, but it didn't come across. Should I use alt print screen instead? or is there a trick to the copy&paste that I am missing with the forum and the workspace?

Santiago Posada
Santiago Posada
5,189 Points

I used Ctrl C to copy Ctrl V to paste if you are on a Mac CMD C CMD V and it works