Technical Documentation Page - Build a Technical Documentation Page

It’s been three days and I can’t figure out what is wrong with my code. I keep getting:

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 don’t know what’s wrong I’ve checked for any typos, there are no white space, …
I’ve just copied the beginning of each sections since the code is pretty long.

<section id="Introduction" class="main-section">
        <header>
          <h2>Introduction</h2>
        </header>
<section id="What_you_should_already_know" class="main-section">
        <header>
          <h2>What you should already know</h2>
        </header>
<section id="JavaScript_and_Java" class="main-section">
        <header >
          <h2>JavaScript and Java</h2>
        </header>
<section id="Hello_world" class="main-section">
        <header>
          <h2>Hello world</h2>
        </header>
<section id="Variables" class="main-section">
        <header>
          <h2>Variables</h2>
        </header>
<section id="Declaring_variables" class="main-section">
        <header>
          <h2>Declaring variables</h2>
        </header> 
<section id="Variable_scope" class="main-section">
        <header>
          <h2>Variable scope</h2>
        </header>
<section id="Global_variables" class="main-section">
        <header>
          <h2>Global variables</h2>
        </header>
<section id="Constants" class="main-section">
        <header>
          <h2>Constants</h2>
        </header>
<section id="Data_types" class="main-section">
        <header>
          <h2>Data types</h2>
        </header>
<section id="If_else_statement" class="main-section">
        <header>
          <h2>If else statement</h2>
        </header>
<section id="while_statement" class="main-section">
        <header>
          <h2>while statement</h2>
        </header>
<section id="Function_declarations" class="main-section">
        <header>
          <h2>Function declarations</h2>
        </header>
<section id="Reference" class="main-section" >
        <header>
          <h2>Reference</h2>
        </header>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

welcome to the community :smiley:
Try not to leave it more than a day before asking for help :slight_smile:

the first child of the main section in your project is currently
<header>
you dont need to embed the elements <h2> in headers to use them.

because each of your <h2> elements are embedded in a <header> they are not children of your <section> elements, they are children of <header> elements

Try removing all the headers from your sections

1 Like

Thank you, since I needed the first child to be the header element I removed the h2 and it finally works.

1 Like