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 trialAbz Man
6,702 PointsRootpaths: I tried numerous combinations but i just don't understand it now?
Please help
<!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
231,269 PointsThe 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
6,702 PointsAbz Man
6,702 PointsCan you show me how to do this please as i cannot comprehend.
Steven Parker
231,269 PointsSteven Parker
231,269 PointsSetting 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>