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

I am at the structure the image gallery section and my image won't show in the website.

I can only see till Contact and then I get the icon like the image is not there anymore.

</a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="index.html">About</a></li> <li><a href="index.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color. </p> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>Experimentation with color. </p> </a>

6 Answers

Marko Koron
Marko Koron
20,658 Points

Post the code. Maybe the in the src you have a typo in your link.

can you see it?

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Giulia | Designer</title> </head> <body> <header>

 <nav>
  <ul>
    <li><a href="index.html">Portfolio</a></li>
    <li><a href="index.html">About</a></li>
    <li><a href="index.html">Contact</a></li>
   </ul>
  </nav>
  </header>
<section>
  <ul>
    <li>
      <a href="img/numbers-01.jpg">
        <img src="img/numbers-01.jpg" alt="">
        <p>Experimentation with color. </p>
    </a>
    </li>
    <li>
      <a href="img/numbers-02.jpg">
        <img src="img/numbers-02.jpg" alt="">
        <p>Experimentation with color. </p>
    </a>
    </li>
    <li>
      <a href="img/numbers-06.jpg">
        <img src="img/numbers-06.jpg" alt="">
        <p>Experimentation with purple. </p>
    </a>
    </li>
    <li>
      <a href="img/numbers-09.jpg">
        <img src="img/numbers-09.jpg" alt="">
        <p>Experimentation with blue. </p>
    </a>
    </li>     
    <li>
      <a href="img/numbers-12.jpg">
        <img src="img/numbers-12.jpg" alt="">
        <p>Experimentation with blue. </p>
    </a>
    </li>
  </ul>
</section>
<footer>

</footer> </body> </html>

Marko Koron
Marko Koron
20,658 Points

Nope, can see anything. Are you using the Treehouse workspace?

Lucas Krause
Lucas Krause
19,924 Points

I hope your code does also contain the <!DOCTYPE html>, the <html>, the <head> and the <body> as well as an opening <header> and a closing <footer>. Moreover make sure that you moved your images into a subdirectory called "img".

Marko Koron
Marko Koron
20,658 Points

O yeah, now I remember that there is this part when you drag the images in the img folder, I can only guess that the images aren't there.

@Lucas yes it contains everything <!DOCTYPE html>, the <html>, the <head> and the <body> as well as an opening <header> and a closing <footer>. and the pictures are there, I can see them when I click on it.. :( I wish I could attach screenshots.

the other thing is that it's not working also when I am doing the exercise, which is odd, because again I copied the code.

Thank you anyway for your answers! Giulia

Lucas Krause
Lucas Krause
19,924 Points

No problem. Your problem sounds very strange to me :/

Lucas Krause
Lucas Krause
19,924 Points

The only things causing an error I can imagine after your response is that you mess up something by using a <base> tag inside of your <head> but this wouldn't explain why the links are working.
Another one is that you may use a XHTML doctype and therefore the self-closing <img> tag isn't valid. In XHTML a void-tag must be written this way <img />. If the markup posted by you is really the one you are using I absolutely don't know what's causing the error. Sorry.