HTML HTML Basics Going Further with HTML Links and Paths Challenge

Clayton Bowland
Clayton Bowland
2,846 Points

setting "portfolio" link to navigate to section

not getting how to set the "portrfolio"link to navigate to section 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</a></li>                
    </ul>
    <h1 id="portfolio">My Portfolio</h1>
  </body>
</html>
Eddy Sentongo
Eddy Sentongo
2,501 Points

When setting up a link you need to enclose the text in your case portfolio in opening and closing anchor tags just like this: <a href="#targetName">portfolio</a> Then you wrap you target in an anchor like this: <a name="#targetName">Portfolio</a> Good luck.

2 Answers

Steven Parker
Steven Parker
171,291 Points

Here's a few hints:

  • the navigation info should be entirely contained between the quotes after "href="
  • navigation to an element ID on the same page should be preceded by a "#" character
  • the beginning "a" tag still needs to end with a ">" character
  • the word "Portfolio" should still be between the tags
Eddy Sentongo
Eddy Sentongo
2,501 Points

When setting up a link you need to enclose the text in your case portfolio in opening and closing anchor tags just like this: <a href="#targetName">portfolio</a> Then you wrap you target in an anchor like this: <a name="#targetName">Portfolio</a> Good luck.