Technical Documentation Page - Help

I’m having some issue with my code. I’m seeing the error " The first child of each .main-section should be a header element."

This is my code below but I don’t understand. Are my header elements not nested correctly ?;

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Technical Documentation Page</title>
  </head>
<body>
  <main id="main-doc">
    <section class="main-section"></section>
    <header>Section One</header>
    <section class="main-section"></section>
    <header>Section Two</header>
    <section class="main-section"></section>
    <header>Section Three</header>
    <section class="main-section"></section>
    <header>Section Four</header>
    <section class="main-section"></section>
    <header>Section Five</header>
    </main>
  </body>
  </html>

This header is not a child of the previous section element. It is a sibling of it.

Move the section element closing tag so it comes after the header element so it can be considered as a child.

Oh, right of course. Thank you.

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