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

Assistance with question

The question is telling to set a link for "portfolio" to a navigating like. How can I do 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="/">Home</a></li>
        <li><a href="">Portfolio</a></li>
    </ul>
    <h1 id="portfolio">My Portfolio</h1>
  </body>
</html>

1 Answer

You link to an id by using the hash tag β€ž#β€œ followed by the id-name.

Like this:

<a href=β€œ#id-nameβ€œ>Link-Text</a>

So in your example it would look like this:

<a href=β€œ#portfolioβ€œ>Portfolio</a>

One little thing that is not wrong but that you should be aware of is indentation. The second list item in your code should better be on the same indentation as the first list item.

So this is correct indentation:

<ul>
  <li>list-item 1</li>
  <li>list-item 2</li>
</ul>

And this is not so good:

<ul>
  <li>list-item 1</li>
    <li>list-item 2</li>
</ul>
<a href=β€œ#portfolioβ€œ>Portfolio</a>

It will still work, there is no problem for the browser. But anybody looking at your code might get confused because it looks like there is another list within a list (which is possible but is not the case here).