HTML HTML Basics Going Further with HTML Links and Paths Challenge

Set the "Portfolio" link to navigate to the section of the page with the id portfolio.

I couldn't do that. Is there anybody could help me ? Thanks.

<!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

Mustafa Khan
Mustafa Khan
4,882 Points

You don't need the slash in front of it, just #portfolio, since you're not going out of the document. The slash is to indicate that you start the path from the top most, or parent one, but that isn't necessary, you just want it to take you to the portfolio part of the page, (in the h1 tags), not to another page. Hope this helps!