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

Abz Man
Abz Man
6,702 Points

Rootpaths: I tried numerous combinations but i just don't understand it now?

Please help

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

1 Answer

Steven Parker
Steven Parker
230,995 Points

The instructions say "Set the "Home" link to a root-relative path that navigates to index.html.", but there's no mention of a specific tag ID to target.

Also, it may work without an explicit name, but it would be better not to assume which file name the server will use as a default.

Abz Man
Abz Man
6,702 Points

Can you show me how to do this please as i cannot comprehend.

Steven Parker
Steven Parker
230,995 Points

Setting the link means filling in the "href" property value, and "root relative" basically means "start with a slash", and then you add the file name:

      <li><a href="/index.html">Home</a></li>