I need help to fix this error!

I’m trying to do the Technical Documentation Page project.
every sections had header element but it still shows me the error.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

il existe aussi des balises header

Photos/screenshots of an error can be helpful, but it also helps to provide the complete code. Posting the code helps us help you better!

When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

I can’t fix one error, in my opinion all sections has header element but error still shows me. my code is below .

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>techcnical-decumentation</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <nav id="navbar">
      <header>
        <h1 class="nav_heading">Js Documentation</h1>
      </header>
      <ul>
        <li>
          <a class="nav-link" href="#introdaction">introdaction</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="#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_declaration">function declaration</a>
        </li>
        <li>
          <a class="nav-link" href="#reference">reference</a>
        </li>
      </ul>
    </nav>
    <main id="main-doc">
      <section id="introdaction" class="main-section">
        <h2>introdaction</h2>
        <p>text will add soon</p>
        <p>text will add soon.</p>
      </section>
      <section id="hello_world" class="main-section">
        <h2>hello world</h2>
        <p>text will add soon....</p>
        <code>
          function greetMe(yourName) { alert("Hello " + yourName); }
greetMe("World");
        </code>
      </section>
      <section id="variables" class="main-section">
        <h2>variables</h2>
        <p>text will add soon3</p>
        <p>text will add soon5</p>
      </section>
      <section id="declaring_variables" class="main-section">
        <h2>declaring variables</h2>
        <p>text will add soon03</p>
      </section>
      <section id="global_variables" class="main-section">
        <h2>global variables</h2>
        <p>text will add soon01</p>
        <p>text will add soon02</p>
      </section>
      <section id="constants" class="main-section">
        <h2>constants</h2>
        <p>text will add soon11</p>
        <code>
          const PI = 3.14;
        </code>
      </section>
      <section id="data_types" class="main-section">
        <h2>data types</h2>
        <p>text will add soon25</p>
        <ul>
          <li>text add ...</li>
          <li><span class="inner_list_item">add ..</span></li>
        </ul>
        <p>text will add soon52</p>
      </section>
      <section id="if_else_statement" class="main-section">
        <h2>if else statement</h2>
        <p>text will add soon6665</p>
        <code>if (condition) { statement_1; } else { statement_2; }</code>
        <p>text will add soo4n</p>
        <code>if (condition_1) { statement_1; } else if (condition_2) {
statement_2; } else if (condition_n) { statement_n; } else {
statement_last; }</code>
      </section>
      <section id="while_statement" class="main-section">
        <h2>while statement</h2>
        <p>text will add soo55</p>
        <code>while (condition) statement</code>
        <p>text will add soo15n</p>
        <code>var n = 0; var x = 0; while (n < 3) { n++; x += n; }</code>
        <p>text will add 1soon</p>
      </section>
      <section id="function_declaration" class="main-section">
        <h2>function declaration</h2>
        <p>text wi5ll add soon</p>
        <ul>
          <li>content add 45soon</li>
          <li>content add so44on</li>
          <li>content add soon78</li>
        </ul>
        <code>function square(number) { return number * number; }</code>
        <p>text will add 4565soon</p>
      </section>
      <section id="reference" class="main-section">
        <h2>reference</h2>
        <p>text 701will add soon</p>
      </section>
    </main>
  </body>
</html>

Hi there!

Any of your .main-section element didn’t have a header element as of it’s first child.
Edit: Change your each h2 element to header element within the .main-section element.

1 Like

I need help to fix this test The first child of each .main-section should be a header element.

Hello. Please can you post your code so we can help if you still need it.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read . You can also use the “preformatted text” tool in the editor ( </> ) to add backticks around text

1 Like

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Ask for Help button located on the challenge (it looks like a question mark). This button only appears if you have tried to submit an answer at least three times.

The Ask for Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Hello @Georgi !

As said is previous posts, seeing your code helps the community know how to provide guidance to help resolve the problem.

I found a post from a few years ago, that provides a great example on how to create the first child header.

I hope checking it out will help you progress and complete your project.

Wishing you good progress on your coding journey. :slightly_smiling_face:

This appears to be a duplicate post, minus the code from a few different posts on this problem.

https://forum.freecodecamp.org/t/i-work-on-the-technical-documentation-page-project/708942/2?u=created-unique

please stop making duplicate posts. You should make one post per challenge or project and no more.
I’ve merged all the duplicates into one for you to preserve all the responses made thus far.

If you need more help you should respond to one of the people who tried to help you with your follow up question instead of making a new post.