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 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,135 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.