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 trialFinley Williamson
11,375 PointsI somehow cannot create this root-relative link back to index.html My code: <li><a href="\">Home</a></li>
I very much feel like this is right already??
It seems very simple and I cannot figure out what I am doing wrong.
<!DOCTYPE html>
<html>
<head>
<title>Portfolio Page</title>
</head>
<body>
<img src="../img/logo.png" alt="Site logo">
<ul>
<li><a href="\">Home</a></li>
<li><a href="">Portfolio</a></li>
</ul>
<h1 id="portfolio">My Portfolio</h1>
</body>
</html>
1 Answer
Steven Parker
231,269 PointsThe folder separator character is not backslash (\), but slash (/ - you got it right already in task 1).
Also, while a simple slash will do the job, it relies on the server configuration to deliver the correct file. For "best practice", you should include the file name after the slash.
Finley Williamson
11,375 PointsFinley Williamson
11,375 PointsWow this is a little strange still.. Only because they say "root-relative." In the exercises immediately preceding this question, root relative paths relied on "\", but I put in a "/" and it worked immediately.
Thanks for the help I'll be thinking about this as I move forward!
Steven Parker
231,269 PointsSteven Parker
231,269 PointsTake another look, I'm pretty sure slash is used consistently throughout the video on Root-relative Paths. There's a particularly good example of 4 root-relative links at about time index 2:10.
Finley Williamson
11,375 PointsFinley Williamson
11,375 Points... I did too many modules yesterday @___@ I went back and looked, I had confused everything. You are correct my friend. Thank you x2