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

Why is this not working????

I do not understand why it keeps asking me to "include an image tag that displays "img/numbers-01.jpg" when I included it in the source code. Can you please help me out?

<!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> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p></p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p></p> </a> </li><li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p></p> </a> </li> </ul> </section> <footer> <p>Β© 2013 Nick Pettit.</p> </footer> </body> </html>

5 Answers

<!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> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p></p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p></p> </a> </li><li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p></p> </a> </li> </ul> </section> <footer> <p>Β© 2013 Nick Pettit.</p> </footer> </body> </html>

It keeps saying that I need to include an image tag, which i'm pretty sure I am doing..

This happened to me yesterday. After many tries, I noticed that I missed a " in the code. Sometimes you miss a space or something small.

Otto Wichmann
Otto Wichmann
4,827 Points

Viewing your code would help a lot, also please mention the specific challenge. In the meantime try this:

<li>
        <a href="img/numbers-01.jpg"> 
          <img src="img/numbers-01.jpg" alt="">
            </a>
        </li>

http://codepen.io/anon/pen/hAoGJ.html

Best of luck. Otto

Thank you Otto,

I copied that code into the document and i'm still experiencing the same error.

Bummer! Make sure you include an image tag that displays "img/numbers-01.jpg".

But when I look at the preview, all the images are displayed.

Thanks, Alex

Otto Wichmann
Otto Wichmann
4,827 Points

Interesting. Could you give me the exact name of the exercise or coding challenge you are trying to complete. I will view it on my own account and get back at you.

I am looking for, track, stage name and number.

I am in the Front End Web Development track, Stage #2, At the challenge after Adding an image gallery.

Hope that's what you are looking for, let me know.

Otto Wichmann
Otto Wichmann
4,827 Points

Ok I think I know where you are. Does the assignment looks like this? :

Inside the three new list items, add the following images from inside the img folder: "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!

First start by copying and pasting this code into your challenge window. This is the "base" code lets call it. Just in case you removed something with out noticing. (I mean you could also reload the page but then you would probably have to do step 1 again)

<!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></li>
        <li></li>
        <li></li>
      </ul>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Otto Wichmann
Otto Wichmann
4,827 Points

Everyone gets stuck somewhere. The important things is not to surrender quite yet. I am sure you will be able to excel this course even if you stumble a couple times (I know I did!). There are a few things to remember. First: Make sure you are working at the right level and adding all the images inside the <section> HERE </section>element. Second: Each single "img/numbers-01.jpg", "img/numbers-02.jpg" and "img/numbers-06.jpg" needs to go inside its own list (<li> HERE </li>). Don't just put them all in the same element.

So lets try completing this: Now that you know where to type, the only thing you are missing is proper declaration. Remember that when we use html we let computer know that we want an image display by typing <img scr="x"> img: means image /// scr: means source /// and then you have to type the path inside "" (quotations).

So it could look something like this:

<li><img src="img/mypicture.jpg" alt=""></li>

Now you try it, with all the pictures (1, 2 and 6)!

Let me know if there is anything else I can do.

Best of luck and keep coding! Otto

Okay this is exactly where I am now, I refreshed the page as well as copied that code.

So I should be starting from scratch.

I noticed the <li>'s in there also, which means the first part of the challenge is complete.

I don't know how to get past the second part.