Build an Event Flyer Page - Build an Event Flyer Page

Tell us what’s happening:

I’m failing step 6. It’s telling me I should have a main element within the body element. There is a main element within the body element. Thanks for any help.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="styles.css" rel="stylesheet">
  <title>Build an Event Flyer Page</title>
</head>

<body>
  <header>
    <img src="https://cdn.freecodecamp.org/curriculum/labs/event.jpg" alt="Brightly coloured bunting">
    <h1>An event</h1>
    <hr>
    <main>
      <section>
        <h2>Highlights</h2>
      </section>
      <section>
        <h2>Special guests</h2> 
      </section>
    </main>

  </header>

</body>

</html>
/* file: styles.css */
body {
  padding-top: 50px;
  padding-bottom: 50px;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: auto;
  margin-left: auto;
  width: 50vw;
  min-height: calc(100vh - 100px);
}

hr {
  width: 100%;
}

img {
  width: auto;
}

section {
  width: 150%;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36

Challenge Information:

Build an Event Flyer Page - Build an Event Flyer Page

Your main element is within the header element. Actually everything is within the header element.

1 Like