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! While you're at it, check out some resources Treehouse students have shared here.

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 HTML Basics Images, Text and Links Understanding File Paths

I'm using href="olr/picture.jpg". My html and picture.jpg are in the same child folder "olr". File not found. What next?

I'm trying to use this file path olr -picture.jpg for this code: | <a href="olr/picture.jpg">html script</a> html But it's not finding the file. "olr" is a child folder under Documents. Not sure what to do next.

2 Answers

Nicole Antonino
Nicole Antonino
12,834 Points

If the html file and the image.jpg are both in orl, then you don't need to write '/olr' in the source link.

You write:

<a href="picture.jpg">html script</a>

By writing "olr/picture.jpg" your computer basically thinks there is another folder named olr within the original olr folder and that picture.jpg is in there.

Fran ADP
Fran ADP
6,304 Points

If it is a relative image you can use as a shortcut '/'.