Build an Event Hub - Build an Event Hub

Tell us what’s happening:

What is wrong with my main tag and section ids it keeps saying they are incorrect

Your code so far

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Event Hub</title>
</head>
   
<body>
    <header>
    <h1>Event Hub</h1>
    <nav>
        <ul>
            <li><a href="#upcoming-events">Upcoming Events</a></li>
            <li><a href="#past-events">Past Events</li>
        </ul>    
    </nav>   
    </header>
    <main>
     <section id="upcoming-events">
      <h2>Upcoming Events</h2>
      <article>
          <h3>Event Title</h3>
          <p>Event information</p>
      </article>
      <article>
          <h3>Event Title</h3>
          <p>Event information</p>
      </article>      
     </section>   
     <section id="past-events">
       <h2>Past Events</h2>
       <article>
           <h3>Event Title</h3>
           <p>Event Information</p>
           <img src="https://cdn.freecodecamp.org/curriculum/labs/past-event1.jpg" alt="event">
       </article>   
       <article>
           <h3>Event Title</h3>
           <p>Event Information</p>
           <img src="https://cdn.freecodecamp.org/curriculum/labs/past-event1.jpg" alt="event">
        </article>      
      </section>
    </main>     
</body>

</html>

Your browser information:

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

Challenge Information:

Build an Event Hub - Build an Event Hub

Welcome to the forum @fd34ever

From the preview it looks like you have an unclosed anchor element.

Happy coding

1 Like

Hey @fd34ever, I think the issue might be due to a small HTML mistake in your navigation menu. Specifically, the second <li> tag for “Past Events” is missing a closing </a> tag, which can cause validation problems in the structure. When HTML is not properly closed, it can affect how other elements—like your <main> and <section> tags—are interpreted by the browser or test. Your <main> tag and section IDs themselves look fine, but small syntax errors can make tests think otherwise. Try closing the <a> tag properly and see if that clears up the issue.

1 Like