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!
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

Nora Richards
302 PointsImages won't show up on website preview
I've been trying to figure out what is wrong with my code-- my images won't show up in the preview. My images are located in a folder named img
Here's my code:
<section> <ul> <li><img src="img/numbers-01.jpg" alt="numbers 1 image"><p>Experimentation with color and texture.</p></li> <li><img src="img/numbers-02.jpg" alt="numbers 2 image"><p>The second image.</p></li> </ul> </section>

dman10345
7,109 PointsCheck to see which directory your images are stored in. If you have your html in a separate folder that is no the root directory you will have to backup one level using "../img/number-01.jpg"

Nora Richards
302 PointsThanks! It's working now.
1 Answer

dman10345
7,109 PointsAnytime, happy coding! Just got reference for everyone else. The image was in a separate directory so you must back out of the directory to the root directory then go into the img folder using "../img/number-01.jpg"
Matthew Garza
26,312 PointsMatthew Garza
26,312 Pointsyou might have to back out of the file. try
img src="../img/numbers-01.jpg"