Main tag using problem with header and footer

Tell us what’s happening:

The main tags should be between the closing header tag and the opening footer tag??-- i don’t get it.

Your code so far


<header>
  <main>
  <h1>Weapons of the Ninja</h1>
</header>


</main>
<footer></footer>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element

The instructions are as follows:

Help him set up his markup by adding opening and closing main tags between the header and footer (covered in other challenges).

<main> AND </main> both must be between the header and footer.

The header and footer are elements. You might want to go back a few lessons to make sure you understand how an element is comprised.

Think of it this way: You should never close off an outer tag of an element until all the inner element opening tags have been closed.

Example of incorrect closing tags:

<body>
  <h1>Weapons of the Ninja
</body>
</h1>

Above the outer element tag (body) is closed before the inner element (h1) has been closed. The correct syntax would be:

<body>
  <h1>Weapons of the Ninja</h1>
</body>
1 Like