Build a Technical Documentation Page HELP ME

Tell us what’s happening:
I do not know why I can not pass the test: Each .nav-link should have an href attribute that links to its corresponding .main-section (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).
Can you help me, please

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

HTML
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Piano</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <nav id="navbar">
      <header>JS Documentation</header>
      <ul>
        <li>
          <a class="nav-link" href="#Introduction">Introduction</a>
        </li>
                <li>
                  <a class="nav-link" href="#What you should already know">What you should already know</a>
                </li>
                        <li>
                          <a class="nav-link" href="#JavaScript and Java" >JavaScript and Java</a>
                        </li>
                                <li>
                                  <a class="nav-link" href="#Hello world" >Hello world</a>
                                </li>
                                        <li>
                                          <a class="nav-link" href="#Variables">Variables</a>
                                        </li>
                                                <li>
                                                  <a class="nav-link" href="#Declaring variables">Declaring variables</a>
                                                </li>
                                                        <li>
                                                          <a class="nav-link" href="#Variable scope">Variable scope</a>
                                                        </li>
                                                                <li>
                                                                  <a class="nav-link" href="#Global variables">Global variables</a>
                                                                </li>
        <li>
          <a class="nav-link" 
 href="#Constants">Constants</a>
        </li>
                <li>
                  <a class="nav-link" href="#Data types">Data types</a>
                </li>
                        <li>
                          <a class="nav-link" href="#Reference">Reference</a>
                        </li>

      </ul>
    </nav>
    <main id="main-doc">
      <section class="main-section" id="Introduction">
        <header>Introduction</header>
        <article><p></p>
        <ul>
              <li></li>      
              <li></li>

        </ul>
        </article>
        </section>
        <section class="main-section" id="What_you_should_already_know">
        <header>What you should already know</header>
        <article><p></p>
        <ul>
          <li></li>
          <li></li>
          <li></li>
        </ul>
        </article>
        </section>
        <section class="main-section" id="JavaScript_and_Java">
        <header>JavaScript and Java</header>
        <article><p></p></article>
        </section>
        <section class="main-section" id="Hello_world">
        <header>Hello world</header>
        <article><p></p>
        <code>function greetMe(yourName) { alert("Hello " + yourName); }
greetMe("World");</code>
        </article>
        </section>
        <section class="main-section" id="Variables">
        <header>Variables</header>
        <article><p></p></article>
        </section>
        <section class="main-section" id="Declaring_variables">
        <header>Declaring variables</header>
<article>
  <p>
    <code></code>
  </p>
  <p>
        <code></code>
  </p>
<p>
      <code></code>
</p>
</article>
        </section>
        <section class="main-section" id="Variable_scope">
        <header>Variable scope</header>
<article>
  <p></p>
  <p>
    <code></code>
  </p>
  <p></p>
<code></code>
</article>
        </section>
        <section class="main-section" id="Global_variables">
        <header>Global variables</header>
        <article><p></p>
        
        </article>
        </section>
        <section class="main-section" id="Constants">
        <header>Constants</header>
        <article>
          <p><code></code></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
        </article>
        </section>
        <section class="main-section" id="Data_types">
        <header>Data types
</header>
<article><p></p></article>
        
        </section>
        <section class="main-section" id="Reference">
        <header>Reference
</header>
<article><p></p></article>
        
        </section>
    </main>
  </body>
  </html>
CSS
#navbar a{
  display: block;
  padding:10px 30px;
  color:#4d4e53;
  text-decoration:none;
  cursor:pointer;
}
#

}

}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Build a Technical Documentation Page

Link to the challenge:

You almost got it
but when you reference an id (href="#idname"), you have to make sure that id matches exactly the id name, spaces and underscores

1 Like

e.g.
< div id=“front_page”> < / div >
< a href="#front_page" > < / a >

1 Like

Thank you so much, I have solved the challenge

1 Like