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">
    <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>
  <header id="header">
    <img id="header-img" src="">
    <nav id="nav-bar">
        <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>
  <section id="hero">
    <h2>Handcrafted, home-made masterpieces</h2>
    <form action="" id="form">
    <input name="email" type="email" id="email" placeholder="Enter your email address">
    <input type="submit" id="submit" value="Get Started" class="btn">

  <video src="" id="video">
    Roman Carnival Overture Op. 9 for Five Trombones


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.

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.