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 Going Further with HTML Links and Paths Challenge

I don't understand.

Guil goes pretty fast, and after rewatching it, I still don't quite get root directory paths. Please explain it.

index.html
<!DOCTYPE html> 
<html>
  <head>
    <title>Portfolio Page</title>
  </head>
  <body>
    <img src="../img/logo.png" alt="Site logo">
    <ul>
      <li><a href="/#index.html">Home</a></li>
      <li><a href="">Portfolio</a></li>                
    </ul>
    <h1 id="portfolio">My Portfolio</h1>
  </body>
</html>

1 Answer

Viktoria S
Viktoria S
6,773 Points

It says: go out of the folder you are currently in, so one level up(..), then look for the 'img' folder, and grab the file named logo.png

Eg this is your file structure: HTML (current folder) -index.html (your current file/ location) IMG (folder of the file you are looking for) -logo.png (the file what you want to use) As you are currently in the index.html file, which is located in the HTML folder, you need to get out of the folder, that '..' is for, and than, you name the folder in which the desired file is located 'img', and finally you provide the name of the file you are looking for: 'logo.png'. Each part need to be separated with the '/'.