Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:
I am stuck here.(Each .nav-link should have an href attribute that links to its corresponding .main-section)

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale="1.0"><title>Technical Documentation Page</title><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="#if...else statement">if...else statement</a></li>
    <li><a class="nav-link" href="#while statement">while statement</a></li>
    <li><a class="nav-link" href="#Function declarations">Function declarations</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><p></p><li></li><li></li></section>
      <section class="main-section" id="What_you_should_already_know"><header>What you should already know</header><p></p><li></li><li></li><li></li></section>
      <section class="main-section" id="JavaScript_and_Java"><header>JavaScript and Java</header><p></p></section>
      <section class="main-section" id="Hello_world"><header>Hello world</header><p></p><code></code></section>
      <section class="main-section" id="Variables"><header>Variables</header><p></p></section>
      <section class="main-section" id="Declaring_variables"><header>Declaring variables</header><p></p><code></code></section>
      <section class="main-section" id="Variable_scope"><header>Variable scope</header><p></p><code></code></section>
      <section class="main-section" id="Global_variables"><header>Global variables</header><p></p></section>
      <section class="main-section" id="Constants"><header>Constants</header><p></p><code></code></section>
      <section class="main-section" id="Data_types"><header>Data types</header><p></p><li></li><li></li></section>
      <section class="main-section" id="if...else_statement"><header>if...else statement</header><p></p><code></code></section>
      <section class="main-section" id="while_statement"><header>while statement</header><p></p><li></li><li></li><li></li><code></code></section>
      <section class="main-section" id="Function_declarations"><header>Function declarations</header>
<p></p><li></li><li></li><li></li><code></code></section>
<section class="main-section" id="Reference"> <header>Reference</header><li></li>
</section>
    </main>
  

 </body>
 </html>

/* file: styles.css */
@media (max-width: 960px) {#introduction{width: 350px}}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.58

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

Have you clicked on each nav link to make sure it takes you to the correct section on the page?

Only the ones with (_) are not taking me to the correct section.

Just in case it isn’t clear. The href and id values should match. You should use an underscore _ instead of a space in both places.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.