How to link navbar buttons to different parts of a website?

hi guys!

I would like your help. I got stuck in how to link navbar buttons to different sections of the website. I searched but i did n’t find anything that discussed this. If could give a help.

<nav id="nav-bar">
      <ul>
        <li><a class="nav-link" href="#features">features</a></li>
        <li> <a class="nav-link" href="#the-best">The best of the industry</a></li>
        <li><a class="nav-link" href="#products">products</a></li>
      </ul>
    </nav>

thank you.Preformatted text

The syntax looks good here.

Make sure wherever you are targeting the links to go have corresponding ids.

For example,

<section id="features">...</section>

4 Likes

yes i’ve got this. you are right, actually i’m studying this right now and i’ve seen that i have to link the (href="#AAA") to (id=“AAA”). then they will link each other. thank you.