HTML HTML Basics Going Further with HTML Links and Paths Challenge

Parminder Kaur
Parminder Kaur
3,219 Points

Set the "Portfolio" link to navigate to the section of the page with the id portfolio. <a href="/#portfolio"></a>.

It won't work

<!DOCTYPE html> 
    <title>Portfolio Page</title>
    <img src="../img/logo.png" alt="Site logo">
      <li><a href="/">Home</a></li>
      <li><a href="/#portfolio">Portfolio</a></li>                
    <h1 id="portfolio">My Portfolio</h1>

1 Answer

Steven Parker
Steven Parker
201,931 Points

For navigating to an ID within the same document, you only need the ID prefixed with "#" (no slash).