Product Landing Page

I’m confused about the error on the test run, I already read my code multiple times and even changed the part where error occurred but still it does not do anythign.
so heres the error statement:
Failed:Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer).

and here’s my code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>Your Product Landing Page</title>
</head>
<body>
  <header id="header">
    <img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png">
    <nav id="nav-bar">
      <ul>
        <li><a href="#features" class="nav-link">Features</a></li>
        <li><a href="#pricing" class="nav-link">Pricing</a></li>
        <li><a href="#contact" class="nav-link">Contact</a></li>
      </ul>
      </ul>
    </nav>
  </header>
  <section id="hero">
    <h2>Handcrafted, home-made masterpieces</h2>
    <form action="https://www.freecodecamp.com/email-submit" id="form">
    
    <input name="email" type="email" id="email" placeholder="Enter your email address">
    <input type="submit" id="submit" value="Get Started" class="btn">
    </form>
  </section>

  <video src="https://youtu.be/y8Yv4pnO7qc" id="video">
    Roman Carnival Overture Op. 9 for Five Trombones
  </video>
  


</body>
</html>

Hi,
You have added the links correctly. However, you don’t have any id with those values ( features, pricing , contact ). So in this case if the user clicks on any of the links, they won’t be taken to anywhere in the page.
You have to add three ids with those values to any of your element.
Hope this helps.

1 Like

You didn’t have section elements , that’s have matching id attribute values as your href values.
@butaslacjino7

1 Like

solved, thank you for helping me guys, appreciate it so much!

What worked for you?

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.