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

Doug Hudson
Doug Hudson
791 Points

Help i think my code challenge is bugged...

Im trying to complete the second task for adding "only" the images into my code and i check my work for task 2. Except when i do i get a error message saying task 1 is not passing. So i click go back to task one and click check work again and task 1 passes? Seems like a bug....please help

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>
      <nav>
        <ul>
          <li>img/numbers-01.jpg</li>
             <img src="numbers-01.jpg" alt="">
          <li>img/numbers-02.jpg</li>
             <img src="numbers-02.jpg" alt="">
          <li>img/numbers-06.jpg</li>
             <img src="numbers-06.jpg" alt="">
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

3 Answers

Ikuko Schoeller
Ikuko Schoeller
6,116 Points

Hi,

The problem said "don’t add any captions" so you probably should not put any words between <li> and </li>. Also between each list items, you put lines. That is why error message saying task 1 is not passing. Please try the code below.

<ul> <li><img src="numbers-01.jpg" alt=""></li> <li><img src="numbers-02.jpg" alt=""></li> <li><img src="numbers-06.jpg" alt=""></li>
</ul>

Make sure that your images are in the same directory where the index.html is situated. If you images are in an other directory make sure that you point it to that directory

Think that your images are in a folder called img, then rewrite the code like this:

<li>img/numbers-01.jpg</li>
             <img src="img/numbers-01.jpg" alt="">
          <li>img/numbers-02.jpg</li>
             <img src="img/numbers-02.jpg" alt="">
          <li>img/numbers-06.jpg</li>
             <img src="img/numbers-06.jpg" alt="">
Damien Watson
Damien Watson
27,419 Points

Hi Doug,

There are a few issues in your code.

  • You open a 'nav' tag which I think is copied from the above list - this tag is not required (its also not closed)
  • Your images are not inside the list items, you close the list item before adding the image.

Correct code looks like this:

      <ul>
        <li><img src="numbers-01.jpg" alt=""></li>
        <li><img src="numbers-02.jpg" alt=""></li>
        <li><img src="numbers-06.jpg" alt=""></li>
      </ul>