Build an Event Hub - Build an Event Hub

Tell us what’s happening:

I feel like its just some slight issue with how I’ve placed the code. The check list is extremely vague and isn’t enough information to help me see where I’m making the mistake.

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

<head>
    <meta charset="utf-8">
    <title>Pet Parties Event Hub</title>
</head>
<body>
<header>
    <h1>Event Hub</h1>
    </header>
    <nav>
        <ul>
            <li>
                <a href="#upcoming-events">Upcoming Events</a></li>
            <li>
                <a hre

Your code so far

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

<head>
    <meta charset="utf-8">
    <title>Pet Parties Event Hub</title>
</head>
<body>
<header>
    <h1>Event Hub</h1>
    </header>
    <nav>
        <ul>
            <li>
                <a href="#upcoming-events">Upcoming Events</a></li>
            <li>
                <a href="#past-events">Past Events</a></li>
                </ul>
    </nav>
    
    <main>
        <section id="upcoming-events"> 
        <h2>Upcoming Events</h2>
        <article><h3>Puppy Parade</h3> 
        <p>Description</p></article>
        
        <article>
            <h3>Kitten Cafe Night</h3> 
        <p>Description</p>
        </article>
         </section>
        <section id ="past-events">
        <h2>Past Events</h2>
        
        <article>
            <h3> Turtle Trott</h3>
            <p>Description </p> 
            <img src="https://cdn.freecodecamp.org/curriculum/labs/past-event1.jpg" alt="fun">
            </article>
        
        <article> 
        <h3>Bird Buddies </h3>
        <p>Description</p>
        <img src="https://cdn.freecodecamp.org/curriculum/labs/past-event2.jpg" alt="games">
        </article>
        </section> </main>

</body>

</html>

Your browser information:

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

Challenge Information:

Build an Event Hub - Build an Event Hub

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

so, where can I view your edited version? i know im not far off.

What tests are you failing?

I have edited your post itself, not anything about your syntax.

    1. Inside the header element, after the h1 element, you should have a nav element.
  • Failed:5. Your nav element should contain an unordered list of two items.

you said you edited my code for readability.


Yes, I edited your post

Please talk about how you got stuck trying to figure out why those tests are failing.

So do you have a nav element inside the header element after the h1 element?

why would my <nav> be in the header but not close in the header?

I’m not sure what “close in the header” means? But it does not look like your nav in inside of the header element?

  1. Your nav element should contain an unordered list of two items…
    I obviously think I’m following directions but the corrections don’t tell me where I’m wrong, just what it wants. That is very vague. Clearly the line of code is incorrect but that’s all I am given.

I would try to fix test 4 first.

1 Like
<header>
    <h1>Event Hub</h1>
    <nav>
    </header>
    
        <ul>
            <li>
                <a href="#upcoming-events">Upcoming Events</a></li>
            <li>
                <a href="#past-events">Past Events</a></li>
                </ul>
    </nav>

This is my correct correction.
Why would an element open with in the <header> element, and not also </nav> close in it?

that is a thing that you need to correct, that is not valid nesting, the closing </nav> needs to go before the closing </header> tag

1 Like

I don’t understand your question.

This is malformed. All nested elements should be closed before you close the parent element.

So, clearly I couldn;t get my answer here.
Thanks.
I figured it out.

We were telling you the issue. But forum rules forbid us from writing the code for you.