5. When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page

Hi guys,

I don’t understand why I don’t get the 5. approved.
I have tried different solutions and I have the link but it is not approved.
I have tried to use <a> in the button and <just after the <li>
Thank you very much if you can check

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<head>
 <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
</head>
<header id="header">
        <img id="header-img" src="https://i.pinimg.com/originals/3c/25/18/3c25183d9e074c314ada832d7d01845a.png">
        <nav id="nav-bar">
          <ul id="nav-link">
            <li class="nav-link">
              <a href="#coaching">
                <button>coaching<a href="#coaching"</a>"</button></li>
            <li class="nav-link"><a class="nav-link" href="#workout"></a>
             <a href="#workout">
               <button>workout<a href="workout"</a></button></li> 
           <li class="nav-link">
             <a href="#discussion">
               <button>discussion<a href="discussion"</a></button></li>
         </ul>  
      </nav>
</header>

<main id="main-content">
     <h1>SWIMMING LIFE</h1>
  <div>
       <video id="video" controls>
  <source src="https://www.youtube.com/watch?v=hvbGrfpCsjo" type="video/mp4">
Your browser does not support the video tag.
      </video> 
  </div>
     <div>
      <h2 id="coaching">coaching</h2>
        <p>Swim coach job is more than a job, it is a lifestyle</p>
      </h2>
     </div>
     <div>
      <h2 id="workout">workout</h2>
        <p>30x100 best average</p>
      </h2>
    </div>
    <div>
      <h2 id="discussion">discussion</h2>
        <p>volume or quality</p>
      </h2>
    </div>
<form id="form">
</form>
</main>

A Pen by Ilenia 29-2-2020 20-41-11

look just below the failing test, it says that your .nav-link elements do not have href attributes. And let me tell you, they don’t.

Next time, if you are working on codepen, can you post the link to your pen? it is easier to debug that way

Thank you very much ! I thought it was more complicated
Yes I will do it next time :+1: