Technical Documentation page not passing test 13

Hi all, I have an issue with my technical documentation page. I cannot seem to be able to make test 13 pass. It states that " 13. When I click on a navbar element, the page should navigate to the corresponding section of the “main-doc” element (e.g. If I click on a “nav-link” element that contains the text “Hello world”, the page navigates to a <section> element that has that id and contains the corresponding <header>.".
Here’s my html navbar code:

<nav id="navbar">
    <div class="navHeading">
    <header>JS Documentation</header><hr>
    <a href="#Introduction" class="nav-link"><li>Introduction</li></a><hr>
    <a href="#What_you_should_already_know" class="nav-link"><li>What you should already know</li></a><hr>
    <a href="#JavaScript_and_Java" class="nav-link"><li>Javascript and Java</li></a><hr>
    <a href="#Hello_world" class="nav-link"><li>Hello world</li></a><hr>
    <a href="#Variables" class="nav-link"><li>Variables</li></a><hr>
    <a href="#Declaring_variables" class="nav-link"><li>Declaring variables</li></a><hr>
    <a href="#Variable_scope" class="nav-link"><li>Variable scope</li></a><hr>
    <a href="#Global_variables" class="nav-link"><li>Global variables</li></a><hr>
    <a href="#Constants" class="nav-link"><li>Constants</li></a><hr>
    <a href="#Data_types" class="nav-link"><li>Data types</li></a><hr>
    <a href="#if_else statement" class="nav-link"><li>if_else statement</li></a><hr>
    <a href="#while_statement" class="nav-link"><li>while statement</li></a><hr>
    <a href="#Function_declaration" class="nav-link"><li>Function declarations</li></a><hr>
    <a href="#Reference" class="nav-link"><li>Reference</li></a>

and here’s the main document section header:

<main id = "main-doc">
    <a id="Introduction"></a>
    <section class="main-section" id="Introduction">
    <a id="What_you_should_already_know"></a>
    <section class="main-section" id="What_you_should_already_know">
      <header>What you should already know</header>

Alternatively, here’s the link to my code:
Can someone tell me what i am doing wrong?


you have duplicateId remember Id 's are unique and only be attached to a single element only.

<a id="What_you_should_already_know" </a> <section class="main-section" id="What_you_should_already_know">

you are attaching same id to both a tag and section tag. remove it from a tag.

I just removed the duplicates. It is still not passing:worried:

you have a typo error at if else statement.

Thanks @gskumawat. I was able to fix it. I’m grateful