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

Digital Literacy

help request: how to make a website error

I'm on the "Organize With Unordered Lists" objective on the How to Make a Website track, and i keep getting an error that says, "Make sure you include an image tag that displays "numbers-01.jpg"." ?!?!?!?

I put <ul>
<li> <a href=""> <img src="numbers-01.jpg" alt""> <p></p> </a> </li> <li> <a href=""> <img src="numbers-02.jpg" alt""> <p></p> </a> </li> <li> <a href=""> <img src="numbers-06.jpg" alt""> <p></p> </a> </li> </ul> in the section element and I keep getting the "Make sure you include an image tag that displays "numbers-01.jpg" error? Can anyone tell me what I'm doing wrong?

2 Answers

Sam,

Re-read the instructions carefully. You'll notice they say to leave out alt tags. You've also got some extraneous markup there; all that's really needed is the img tags and a src attribute. Like this:

    <section>
      <ul>
        <li><img src="numbers-01.jpg"></li>
        <li><img src="numbers-02.jpg"></li>
        <li><img src="numbers-06.jpg"></li>
      </ul>
    </section>
Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Maybe you need to reference an image that is in a directory called "img". It's common to separate all your images in a web project into an images directory. This is specified as a "relative" file path.

So update your image src attributes to look like this.

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

It still gives the same error message. This is what I typed in <!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=""> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> </a> </li> </ul> </section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Take out the references to the path on your hyperlinks.

Unless you've reached the part of the challenge that asks you to put those in this might be confusing the challenge engine.

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

I'm on the challenge task 2 of 2, I don't know what I'm doing wrong. I have tried everything, does anyone know how to fix this problem?