Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,177 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,177 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,177 Points

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