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

HTML

Downloaded image from Internet.

Hello,

I was hoping someone could help me with an issue I'm having concerning an image. I recently downloaded an image from www.freeimages.com, and then I set the picture inside a folder called Images inside my Pictures folder on my Mac. When I set up my code it looked like this, <section> <img src="Pictures/Images/chemical.jpg" alt="chemicals">

I'm not sure why this is not working because I thought you were suppose to call the folders being used in order.

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,854 Points

It's tough to tell without actually seeing your code. But, if the Image folder is in the root directory with your index.html file, you would call the image like so... imageFolder/imagename.jpg. Here you are telling it to go to the imageName folder and inside you will find the image. If, by chance, your index.html file is in a folder itself in the root directory, you would need to call ../imageFolder/imagename.jpg. Here you are telling it to go up a directory, then go into the folder and get the file.

Overall, it all kind of depends on where the files (including your index.html) are located in relation to each other. It's a good idea to have the index.html file in the root directory, and then relate all other files to that.

Hope that helps. Keep Coding. :)

Thank you very much it did!

jason chan
jason chan
31,008 Points

your not putting the correct location in your html.

Hello Jason,

Thank you for getting back to me so quickly, but do you mind elaborating?