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 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,810 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,291 Points

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