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

Andrew Biviano
Andrew Biviano
6,748 Points

Adding images to List items, my code should work....

<section> <ul> <li><img src="img/number-01.jpg" alt=""></li> <li><img src="img/number-01.jpg" alt=""></li> <li><img src="img/number-01.jpg" alt=""></li> </ul> </section>

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul>
          <li><a href="index.html">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </nav>
    </header>
    <section>
      <ul>
        <li><img src=img/number-01.jpg></li>
        <li><img src=img/number-01.jpg></li>
        <li><img src=img/number-01.jpg></li>
      </ul>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Andrew Biviano
Andrew Biviano
6,748 Points

ummm, the code that rendered above is different than the code I wrote, specifically the alt fields and lack of quotes around the URL

4 Answers

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,077 Points

The problem is the fact that there is no img folder that these images are in. So basically you are trying to reference to images in a folder that does not exist. Remember the instructions only called for:

"Inside the three new list items, add the following images: "numbers-01.jpg", "numbers-02.jpg", and "numbers-06.jpg". Leave the alt attributes blank, and don’t add any captions or links. Just the images!"

See that the images aren't specified to have been in another folder. So that's your problem just remove the "img/" and you should be fine.

lol this help me but now the second pic dosent load lol

Dane Parchment
Dane Parchment
Treehouse Moderator 11,077 Points

Are you spelling them correctly, i noticed that you typed number-01.jpg instead of numbers-01.jpg, try adding an 's' to the end of the "numbers" and see if that works. Another issue is the fact that you don't have quotes around the image paths.

ok so i did what dane said and just got to make sure that the <img looks like that if there is space between them it wont work like < img

thx my problen was with leaving a space between the < and the img