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 know how to do this one correctly. Help?

I don't know how to do this one correctly. Help?

index.html
<!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>

5 Answers

Christopher De Lette
PLUS
Christopher De Lette
Courses Plus Student 7,139 Points

Hi Derrick,

It's unclear from the explanation on where you're having trouble with this challenge so i'll go through all three parts of the challenge to assist:

Step 1: Go up one folder and then into the img folder for the logo.png. You have this correct according to the snippet in the original post.
Step 2: Root-relative path that returns you to the index.html file. You have the / correct, now you need to type the path where index.html resides, usually in the root of the topmost folder. Remember that Root-relative has to be local to your machine or on the server you are working on to function properly. Step 3: Use the attribute to navigate to the id portfolio. The way you do this is by adding a # sign first then id's name.

Hope this helps

Take care and Happy Coding!

Chris

Steven Parker
Steven Parker
231,269 Points

It looks like you're on task 2, "Set the "Home" link to a root-relative path that navigates to index.html."

You got the "/" part to make it root-relative, but you still need to put the file name after that.

Ari Misha
Ari Misha
19,323 Points

Hiya Derrick! I think i know whatchu mean. A relative path is a way to specify the location of a directory relative to another directory. For example, suppose your documents are in C:\Sample\Documents and your index is in C:\Sample\Index. The absolute path for the documents would be C:\Sample\Documents. The relative path from C:\Sample\Index to C:\Sample\Documents would be ..\Documents.

So the answer is obvious here:

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

Hey - thanks for writing back so fast. Really appreciate the help. I'll be clearer next time.

THANK YOU!

Christopher De Lette
Christopher De Lette
Courses Plus Student 7,139 Points

You're most welcome, that's what this community is here to do, help one another. As Mr. Parker stated, please close this thread by choosing the best answer.

Take care and Happy Coding!

Hi Steven -

Thanks for the quick help. Got it!

Much appreciated.

THANK YOU!