Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Creating HTML Content Organize with Unordered Lists

Is This a Proper Image Tag?

I am currently working on stage 3 of the HTML coding series. and It is telling em this isn't a proper image tag. Could someone please tell me id i'm doing this correctly.

<!DOCTYPE html>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
      <a href="index.html">
        <h1>Nick Pettit</h1>
          <li><a href="index.html">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        <li>Blank 1</li>
          <img src="img/numbers-01.jpg" alt="" width="720" height="1080">
        <li>Blank 2</li>
          <img src="img/numbers-02.jpg" alt="" width="720" height="1080">
        <li>Blank 3</li>
          <img src="img/numbers-06.jpg" alt="" width="720" height="1080">  
      <p>&copy; 2013 Nick Pettit.</p>

3 Answers

It's failing because you have inserted your images outside of your

tags. :)

You need to place your img tags where you have "Blank 1", "Blank 2" and "Blank 3"


I wonder if it's because you didn't include the closing slash at the end of the img tag; try this:

<img src="img/numbers-01.jpg" alt="" width="720" height="1080" />

Lauren Stuckey
Lauren Stuckey
12,428 Points

Hi Ryan, since image tags are self closing tags, you need the slash inside the tag itself, like this:

<img src="img/numbers-01.jpg" alt="" width="720" height="1080" />

Try adding that slash just before the closing carrot bracket on each of your images and see if that works for you. Best of luck!