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 Add Image Gallery Content

Judith King
Judith King
1,356 Points

adding images

i added code below, but images not loading. what am i doing wrong. thank you

<!DOCTYPE html> <html> <head> <title>Jane Doe|Writer</title> </head> <body> <header> <h1>Jane Doe</h1> <h2>Writer</h2> </header> <nav> <ul>

  <li><a href="index.html">Images</a></li>
  <li><a href="about.html">About</a></li>
  <li><a href="contact.html">Contact</a></li>
  </ul>
</nav>
<section>
<ul>
  <li>
    <a>href="img/numbers-01.jpeg
      <img src="img/numbers-01.jpeg">
      <p>Color exxperiment</p>
    </a>
  </li>
    <li>
    <a>href="img/numbers-02.jpeg
      <img src="img/numbers-02.jpeg">
      <p>Blending color</p>
    </a>
  </li>
    <li>
    <a>href="img/numbers-06.jpeg
      <img src="img/numbers-06.jpeg">
      <p>trying to make it workt</p>
    </a>
  </li>
    <li>
    <a>href="img/numbers-09.jpeg
      <img src="img/numbers-09.jpeg">
      <p>here we go</p>
    </a>
  </li>
    <li>
    <a>href="img/numbers-12.jpeg
      <img src="img/numbers-12.jpeg">
      <p>not</p>
    </a>
  </li>
  </ul>
</section>
<footer></footer>

</body>

</html>

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

Two things, one is your anchor tags are mixed up.

You have <a>href="img/numbers-12.jpeg and it should be <a href="img/numbers-12.jpeg">.

Two is make absolute sure that from wherever this file lives, in that some area you have a folder named "img" and inside that folder, are these images named exactly what you have coded.