These codes drive me nut sometimes

please can someone tell me what is the problem here:


    <header>
      <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      </header>
      </main>

which

It really helps if you include a link to the challenge and describe the issue you are having passing the challenge. Thanks

Learn Basic CSS by Building a Cafe Menu: Step 8 | freeCodeCamp.org

You closing tag < / main > should be within / above the < / header >

The instructions say that the main element should be below the header element.

i also did that but it was working

<header>
      <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      </header>
         </main>

i did both above and below the header closing tag, its still not working

The full main element needs to come after the closing header tag.

maybe you should take a look at this:

<header>
      <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
      </main> 

when i checked the code, it says
Your main tag should come after your header tag.

… That’s because you have your opening main tag before the closing header tag… Neither the opening or closing main tag should be above the opening or closing header tag.

i have gotten it right!!!

<header>
     <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
      <main>
        </main> 

thanks alot

1 Like
<header>
      <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>     
         </main>
 </header>

That’s not what the challenge wants, but please don’t try to provide answers to challenge for users. Writing out solutions is against the rules.

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