HTML HTML Basics Going Further with HTML Links and Paths Challenge

Julie Kulzick
Julie Kulzick
1,207 Points

How do I get the "portfolio" link to navigate to the section of the page with the id portfolio?

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">Portfolio</a></li>                
    </ul>
    <h1 id="portfolio">My Portfolio</h1>
  </body>
</html>

2 Answers

Brandon Van Camp
Brandon Van Camp
Front End Web Development Techdegree Graduate 29,938 Points

Julie, your almost there. Instead of a "/", when navigating to a id on the same page we want just "#portfolio".

example

<li><a href="#portfolio">Portfolio</a></li>