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 One Solution

Linking to index.html

Would images/index.html be be accepted as well as../index.html? I understand that ../ means leaving the current folder but as there are other subfolders and I'm not already in "images" how does the computer know that that is where you find index.html?

1 Answer

Steven Parker
Steven Parker
231,269 Points

The "../" designation refers to the parent folder itself, not another subfolder.

While technically possible, it wouldn't make sense to put an HTML file in the folder named "images".

I thought I understood but I'm still a little confused. The root folder is "practice file pa..." right? Or am I wrong about this? The 'index.html' we start off is in the folder 'images'. So when we leave the 'images' folder and go to the 'pages' folder, when we use"../" is it referring to "practice file pa..."? It turns out I have two questions...thank you for your patience and time.

  1. If not "practice file pa...", what is "../" referring to?
  2. if it is referring to "practice file pa...", when we use "../index.html but we're no longer in the image folder...how does the computer know ../index.html is located in the images subfolder?

Thanks in advance.

Hi, sorry to bother you again. I've just realized that it's under the folder images and not in it. I didn't realize as I thought every separate folder/ document had a little white arrow beside it. My bad. Thanks again.