Technical Documentation Page - Build a Technical Documentation Page

What am i doing wrong?
it says " Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_) for the id’s."

and

You should have the same number of .nav-link and .main-section elements.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
  <html lang="en"></html>
<html>

<head>
  <link rel="stylesheet" href="styles.css">
</head>

<body>
    <nav id="navbar">
    <header>JS Documentation</header>
  <ul>
    <li><a class ="nav-link" href="#Introduction">Introduction</li>
    <li><a class="nav-link" href="#What-you-should-already-know">What you should already know</a>
    <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>
  </ul>
    </nav>
    <main id="main-doc">
    
  <section class="main-section" id="Introduction">
      <header>Introduction</header>

      <p>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. </p>
      <p>JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example: </p>
      <ul>
      <code></code>
      <li>Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. </li>
      <li>Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. </li>
      </ul>
      </section>

  <section class="main-section" id="What-you-should-already-know">
      <header>What you should already know</header>
      <code></code>
      <ul>  
      <p>This guide assumes you have the following basic background:</p>
      <li> A general understanding of the Internet and the World Wide Web (WWW). </li>
      <li>Good working knowledge of HyperText Markup Language (HTML).</li>
      <li>Some programming experience. If you are new to programming, try one of the tutorials linked on the main page about JavaScript. </li>
      </ul>
        </section>
  
    <section class="main-section" id="JavaScript_and_Java">
        <header>JavaScript and Java</header>
        <code></code>
        <ul>   
        <p></p>
        <p></p>
        </ul>
        </section>  


    <section class="main-section" id="Hello_world">
        <header>Hello world</header>

        <ul>   
        <p> To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code: </p>
                <code>function greetMe(yourName) { alert("Hello " + yourName); }
            greetMe("World");
          </code>
        <p> Select the code in the pad and hit Ctrl+R to watch it unfold in your browser! </p>
        </ul>
    </section>

    <section class="main-section" id="Variables">
        <header>Variables</header>
        <code></code>
        <ul>    
        <p>You use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules. </p>
        <p>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase). </p>
        <p>You can use ISO 8859-1 or Unicode letters such as å and ü in identifiers. You can also use the Unicode escape sequences as characters in identifiers. Some examples of legal names are Number_hits, temp99, and _name. </p>
        </ul>
    </section>

</main>
</body>
</html>
```css
/* file: styles.css */

Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

For the first error:

Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_ ) for the id’s.

And in your code I see this:

  <section class="main-section" id="What-you-should-already-know">

Reread that message and the code closely.

Remember that computers are very, very, vey picky, on a level that is hard for humans to understand. They are not good at, “well, I think I know what he meant” - we have to lower ourselves to their level.

See if you can apply that kind of thinking to the other issues. Check back if you get stuck.

Remember, every great coder is a great debugger. And great debuggers are great detectives.

ahh i see, thank you

it still says You should have the same number of .nav-link and .main-section elements.
ive counted those elements in page multiple times now and dont know what im missing

Use an editor to do the counting for you. Look for all occurrences of nav-link and compare to how many sections you think you have (often people write the wrong class on their elements so it is good to confirm you have not)

i pasted into vs code and ctrl + F to count how many i have and i have 5 of both. idk whats wrong with my code

when I check your code, the first error I see is

Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_ ) for the id’s.

I think you should fix this one first?

i have 5 sections and 5 nav-links but it still says:
You should have the same number of .nav-link and .main-section elements.
Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
  <html lang="en">


<head>
  <link rel="stylesheet" href="styles.css">
</head>

<body>
    <nav id="navbar">
    <header>JS Documentation</header>
  <ul>
    <li><a class ="nav-link" href="#Introduction">Introduction</li>
    <li><a class="nav-link" href="#What_you_should_already_know">What you should already know</a>
    <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>
  </ul>
    </nav>
    <main id="main-doc">
    
  <section class="main-section" id="Introduction">
      <header>Introduction</header>

      <p>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. </p>
      <p>JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example: </p>
      <ul>
      <code></code>
      <li>Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. </li>
      <li>Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. </li>
      </ul>
      </section>

  <section class="main-section" id="What_you_should_already_know">
      <header>What you should already know</header>
      <code></code>
      <ul>  
      <p>This guide assumes you have the following basic background:</p>
      <li> A general understanding of the Internet and the World Wide Web (WWW). </li>
      <li>Good working knowledge of HyperText Markup Language (HTML).</li>
      <li>Some programming experience. If you are new to programming, try one of the tutorials linked on the main page about JavaScript. </li>
      </ul>
        </section>
  
    <section class="main-section" id="JavaScript_and_Java">
        <header>JavaScript and Java</header>
        <code></code>
        <ul>   
        <p></p>
        <p></p>
        </ul>
        </section>  


    <section class="main-section" id="Hello_world">
        <header>Hello world</header>

        <ul>   
        <p> To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code: </p>
                <code>function greetMe(yourName) { alert("Hello " + yourName); }
            greetMe("World");
          </code>
        <p> Select the code in the pad and hit Ctrl+R to watch it unfold in your browser! </p>
        </ul>
    </section>
    

    <section class="main-section" id="Variables">
        <header>Variables</header>
        <code></code>
        <ul>    
        <p>You use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules. </p>
        <p>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase). </p>
        <p>You can use ISO 8859-1 or Unicode letters such as å and ü in identifiers. You can also use the Unicode escape sequences as characters in identifiers. Some examples of legal names are Number_hits, temp99, and _name. </p>
        </ul>
    </section>

    
</main>

</body>

</html>




















/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

please do not create duplicate topics on the same issue.
I have merged your duplicates.

I found a few syntax errors in your code.
When I fixed them, the code passed.

To see all the errors, paste the html into this online html validator:

thx for the help, was able to complete it

1 Like

(post deleted by author)

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