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

Phyllis Kauflin
Phyllis Kauflin
1,152 Points

Images do not appear

Images do not appear. All that shows is a rectangle with slash

4 Answers

Stone Preston
Stone Preston
42,016 Points

your file paths may be incorrect. can you post the code for your image gallery?

Stone Preston
Stone Preston
42,016 Points

do you have an img directory located in the same folder as your index.html with a file named distinction.jpg inside it?

For the How to Make a Website track, my images appear as broken. My course content is a little different. I do have my images directory located in the same folder as index.html.

<section> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li>

Phyllis Kauflin
Phyllis Kauflin
1,152 Points

fixed it...thanks for your time. (I renamed some of the photos and didn't include the "jpg")

Phyllis Kauflin
Phyllis Kauflin
1,152 Points

thank you, here is my code

<li>
        <a href="img/distinction.jpg">
          <img src="img/distinction.jpg" alt="">
          <p>Distinction Magazine Article</p>
         </a>  
        </li>