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 Structure the Image Gallery

still do not get it

i have already asked the a question about the code challenge 2 of 2 about adding images to the sit i type in <img src"img/numbers-01.jpg " alt> did not work then i typed in < a href="img/numbers-01.jpg alt""> thats wrong can somebody help me here! no matter what i type the images do not show on the unordered list plus i know it not my computer because every other challenge i have passed again can get any tips here!

12 Answers

Adam Bass
PLUS
Adam Bass
Courses Plus Student 11,613 Points

I'm not sure where the code is not working either. Without seeing all the code for the challenge its hard to tell. I just took a look at the challenge and got the following code to pass. Take a look at it and see if it helps find where there might be something missing in your code.

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

Thank you Very Much For All Adam It Finally Worked!

Tom Bedford
Tom Bedford
15,645 Points

Hi Johnathan, it looks like your combining the anchor <a> tag and the image <img> tags there!

An anchor tag looks like this:

<a href="/path/to/file.html">amazing link</a>

An image tag looks like this:

<img src="/path/to/image.jpg" alt="a pretty red flower">

Hope this helps!

See My Answer Below

To show images, you need to use an img element.

It'll look something like:

<img src="img/numbers-01.jpg" alt="Something">

To make it a link you will need to enclose the img tag in an anchor (a) tag.

It'll look something like:

<a href="http://example.com"><img src="img/numbers-01.jpg" alt="Something"></a>
Matthew Shettler
Matthew Shettler
8,819 Points

If you're trying to add an image to the page, it needs to go into an image tag (not an anchor tag).

<img src="http://i.imgur.com/h0mYegd.gif" alt="Pokeball Cat">

Voila, your image appears.

Pokeball Cat

but were do you get the images for the code challenge

Adam Bass
PLUS
Adam Bass
Courses Plus Student 11,613 Points

Looks like this challenge is just wanting the images in an un-ordered list. So you would be wanting your images in between list items like

<li></li>

The images inside the list item tags would be something like

<img src='img/numbers-01.jpg' alt=''>

so the images in the un-ordered list when i list them do get them from the project folder or do have put a URL in i just kinda confused bear with i very new to this and thank you for your time

Adam Bass
PLUS
Adam Bass
Courses Plus Student 11,613 Points

The images for the code challenge are listed at the top in the challenge task area. They are "numbers-01.jpg","numbers-02.jpg", and "numbers-06.jpg".

ok i tried using the img element but it still does not show

Adam Bass
Adam Bass
Courses Plus Student 11,613 Points

Are you including the folder the images are located in as well? You would want something like <img src='img/numbers-01.jpg' alt=''>

still nothing sorry

Adam Bass
PLUS
Adam Bass
Courses Plus Student 11,613 Points

Strange. Can you post your code that is not working please? If you can post the entire code from this particular challenge from the opening section tag to the closing section tag that would help.

<img src='img/numbers-01.jpg' alt=''> thats one the other <img src="img/numbers-01.jpg" alt="">

    sorry i mean <img src='img/numbers-01.jpg' alt=''>

honestly i even can't figure out what is wrong

Adam Bass
PLUS
Adam Bass
Courses Plus Student 11,613 Points

Nice! No worries Johnathan, I'm glad I could help!