Problems passing "Build a landing page" challenge

Ive one rule yet to pass, and i dont seem to understand whats the issue is, since it should work, the id nav bar is inside header

3. Within the <header> element I can see a <nav> element with corresponding id=“nav-bar”.’

#nav-bar is not a child of #header : expected 0 to equal 1
AssertionError: #nav-bar is not a child of #header : expected 0 to equal 1
at s.u (
at s.e.(anonymous function) [as equal] (
at Function.n.strictEqual (
at r. (
at c (
at (
at m.runTest (
at s (

<script src=""></script>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>FCC- Product Landing Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="styles.css" />
    <script src="main.js"></script>

        <div id="header">
            <img id="header-img" src="">

        <nav id="nav-bar">
            <ul id="navigation-bar">
                <li><a class="nav-link" href="#features">Features</a></li>
                <li><a class="nav-link" href="#how-it-works">How it works</a></li>
                <li><a class="nav-link" href="#pricing">Pricing</a></li>

    <section id="how-it-works">
        <form action="" method="post" id="form">
            <h2>Handcrafted, home-made masterpieces</h2>
            <input name="email" id="email" type="email" placeholder="Enter your email address">
            <input type="submit" id="submit">GET STARTED</input>
        <iframe id="video" width="560" height="315" src="" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
     <section id="features">

    <section id="pricing">

“AssertionError: #nav-bar is not a child of #header : expected 0 to equal 1”

So, in the html structure above you can see that <nav id="nav-bar"> its not a direct child of <div id="header">.

Just move the id="header" from div element to <header id="header"> and you will pass all tests.

Happy coding

1 Like

Thanks, I wonder how could i not see that :sweat: