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.


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

you might have to back out of the file. try
img src="../img/numbers-01.jpg"

Check 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"

Thanks! It's working now.

1 Answer

Anytime, 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"