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

Images not showing

So I have seen other discussions like what I am posting, so I am sorry I am posting again. Everytime I look at my code I don't see what I am doing wrong. Thoughts?

I get boxes that show it is wanting to put an image in, but no image appears.

      <ul>
        <li>
          <a href="img/numbers-01.jpg">
            <img src="img/numbers-01.jpg" alt="">
            <p>The number 1.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-02.jpg">
            <img src="img/numbers-02.jpg" alt="">
            <p>The number 2.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-06.jpg">
            <img src="img/numbers-06.jpg" alt="">
            <p>The number 6.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-09.jpg">
            <img src="img/numbers-09.jpg" alt="">
            <p>The number 9.</p>
          </a>
        </li>
        <li>
          <a href="img/numbers-12.jpg">
            <img src="img/numbers-12.jpg" alt="">
            <p>The number 12.</p>
          </a>
        </li>
      </ul>
    </section>```

7 Answers

I'm sorry if this sounds silly, but do you have the images in a folder named "img"?

After reviewing your code it looks right. I'd make sure the images are in the img file. If not drag them in there. If they are, I'd check the css code..

Is this within a code challenge? If so what one so that we can reference the specifics.

Why do you have the <a href> pointing to the image? I think that might be where some of the confusion is.

I'm not sure if this is the correct challenge that I got this from but here is the markup for the Organize with Unordered Lists.

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

Hopefully that helps.

It is part of the module so that when you complete the site, the images will link to their larger image.

Ahh-that makes sense for that. What is the link to the code challenge?

I still have the materials from this module so I copied and pasted your code above into the index.html I still had and everything worked fine. back to my original question, I would make sure that you have the images in the img folder that the href is pointing to. It is the only thing I can think of if you are getting a box showing the image should be there, but no image. Is it showing as broken?

Thank you all of your input. The images are in the folder. I have reloaded them a couple of times to verify. I have even loaded my own images and tried them, but with the same result.

Rob to your last question, yes I get a box that is showing something should be there, but no image. If I click on the image it will open another tab in my browser with a 404 Not Found message.

Also as previous pointed out, this was not from a challenge. This is from Session: Add Image Gallery Content (https://teamtreehouse.com/library/how-to-make-a-website/creating-html-content/add-image-gallery-content)

thanks

I reloaded again and they took this time.

Once again thank you for your comments. Sorry to waste some of your time.

Learning and problem solving is never a waster of time Brandon. Glad it's working. I'm a beginner just like you and have found small bugs. I've found just erasing a line of code and doing it again is the answer. Good luck on your quest. /mommode