Building a technical documentation page project

This project asked " When you click on a navbar element, the page should navigate to the corresponding section of the main-doc element (e.g. If you click on a nav-link element that contains the text “Hello world”, the page navigates to a section element with that id, and contains the corresponding header)" And my page is actually navigating as it should be but I cannot get the check mark and still saying that my code is incorrect. Here is my code

<nav id="navbar">
<Header> Understanding Coding </header>
<li><a class="nav-link" href="#JavaScript">JavaScript</a></li>
<li><a class="nav-link"
href="#Java">Java</a></li>
<li><a class="nav-link"
href="#C++">C++</a></li>
<li><a class="nav-link"
href="#C#">C#</a></li>
<a class="nav-link"
href="#Python">Python</a>
</nav>

And here is the main-doc elements code

<main id="main-doc">Coding Languages
<section class="main-section" id="Javascript">
<Header>Javascript</header>
<p> this the 1st paragraph</p>
<code> This javascript </code>
<li> 1</li>
<p> This the 2nd paragraph </p>
</section>
<section class="main-section"
id="Java">
<header>Java</header>
<p> this the 1st paragraph</p>
<code> This Java </code>
<li>2</li>
<p> This the 2nd paragraph </p>
</section>
<section class="main-section"
id="C++">
<header>C++</header>
<p> this the 1st paragraph</p>
<code> This C++ </code>
<li>3</li>
<p> This the 2nd paragraph </p>
</section>
<section class="main-section"id="C#">
  <header>C#</header>
<p> this the 1st paragraph</p>
<code> This C# </code>
<li>4</li>
<p> This the 2nd paragraph </p>
</section>
<section class="main-section"id="Python"> <header>Python</header>
<p> this is the 1st paragraph </P>
<code> This Python </code>
<li>5</li>
<p> this is the 2nd paragraph</p>
</section>

Please help?

Thank you !

hey, on your nav-link you’ve made a typo #c#

2 Likes

Hi @Lucien516 ,

Look at the value of the id here :

and the value of the href here :

They’re not exactly the same.

2 Likes

Thanks a lot spark07. I didn’t know such a small difference can make a big difference lol ahaha.

1 Like

Appreciate the input , I found mistake it was a misspelling.

1 Like