Technical Documentation

Hello friends! I’m unable to complete the third last task in this lesson,someone kindly help.
The question requires me to have href="" that links the each element with a class of nav-link to its corresponding main-section class.

<!DOCTYPE html>
<html>
  <head lang="en" >
    <link rel="stylesheet" href="styles.css">
    <meta chrset="utf-8">
    <title></title>
  </head>
  <body>


  <main id="main-doc">JavaScript Documentation

    <nav id="navbar"><header>JavaScript is a cross-platform, object-oriented scripting language. It is a small and lightweight language. Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.

</header></br>
  <a class="nav-link" href="Introduction">Introduction</a>
  <a class="nav-link" href="Data_types">Data types</a>
  <a class="nav-link" href="JavaScript_and_Java">JavaScript and Java</a>
  <a class="nav-link" href="Hello_world">Hello world</a>
  <a class="nav-link" href="Variables">Variables</a>
</nav>

    <section class="main-section" id="Introduction">
      <header>Introduction</header>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <ol>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ol>
    </section>

    <section class="main-section" id="Data_types">
      <header>Data types</header>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <ol>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ol>
    </section>

    <section class="main-section" id="JavaScript_and_Java">
      <header>JavaScript and Java</header>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <ol>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ol>
    </section>

    <section class="main-section" id="Hello_world">
      <header>Hello world</header>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <ol>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ol>
    </section>

    <section class="main-section" id="Variables">
      <header>Variables</header>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <p></p>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <code></code>
      <ol>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ol>
    </section>

  </main>

  </body>
  </html>

@Cody_Biggs kindly help

You need to add a # in front of all the text in your href for example:

href="#place_on_page"

You do this because when you click on that link its taking you to that section element that has that id on the page. I am sure you remember that # is used for ids and without it in the href all you have is just text and its not sure what to do with just the text in the href

Thank you mate,I now understand why development needs a team.

1 Like

Absolutely, I ask other developers on my team to look over my code sometimes. Getting a second pair of eyes to take a look can make all the difference