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 Structure the Image Gallery

Steven Hollifield
Steven Hollifield
178 Points

Broken Image Icon

Not sure what I'm doing wrong here. Code looks correct but its just not showing me the image when I preview only the broken icon. This is how is how I have it written.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>DeadReckoning | Gamer</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <h1>DeadReckoning</h1>
        <h2>Gaming Headquarters</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>
    <sections>
       <ul>
         <li>
           <img src="img/numbers-01.jpg" alt="">
         </li>
       </ul>
    </sections>
    <footer>
      <p>&copy; 2015 Gladkill</p>
    </footer>
  </body>
</html>
Steven Hollifield
Steven Hollifield
178 Points

It didnt show my code. <li> <img src="img/numbers-01.jpg" alt=""> </li>

Hi Steven,

Can you post your code with 3 backticks (```) on the line above and 3 on the line below the code please?

Thanks

-Rich

Steven Hollifield
Steven Hollifield
178 Points
<li>
  <img src="img/numbers-01.jpg" alt="">
</li>
Alex Hedley
Alex Hedley
16,381 Points

Does the folder exist? Does the image exist?

try

<img src="/img/numbers-01.jpg" alt="">
Steven Hollifield
Steven Hollifield
178 Points

Yes the image exists and yes the folder exists. Asdding / in front of my img reference changed nothing.

i have the same problem the image is not working please help <THANKYOU> </team treehouse>

5 Answers

you are missing a tag this is how you write it <li> <img src="img/numbres-01.jpg"> </li>

Bobby Martin
Bobby Martin
8,624 Points
<img src="/img/numbers-01.jpg" alt="">

If you are trying to go back a folder to get to the image folder you need a .. Like this

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

listen to the teacher when he is saying start with tag take close look at the code i hope it will help you

Matthew Krey
Matthew Krey
3,973 Points

Hey dude, so I noticed here that your section elements read as:

<sections>
       <ul>
         <li>
           <img src="img/numbers-01.jpg" alt="">
         </li>
       </ul>
</sections>
            ```

Try rewriting beginning with the green text below as:

```html

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

Let me know if that helps!

I had the same problem. I had the folder named "IMG" changed it to "img" and it works now.