Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Creating HTML Content Create Navigation with Lists

Iram Pacheco Garcia
Iram Pacheco Garcia
9,099 Points

Why is it that when I make my closing </nav> on question 1, it doesn't pass?

When I remove my closing </nav> tag on question one, it doesn't pass. When I hit question 2, it says question 1 now has an error

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <nav>
          <ul>
            <li>Portfolio</li>
            <li>About</li>
            <li>Contact</li>
          </ul>


        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Saira Bottemuller
Saira Bottemuller
Courses Plus Student 1,749 Points

Hi Iram :) Can you be a little more specific? The folks in the forum don't have access to see which questions you're talking about. Sometimes it's best to copy and paste the questions themselves, along with your coding efforts. Don't be discouraged, just give us all the details you can so we can help you work through it. :)

3 Answers

The challenge is asking: Create a navigation element with an unordered list element after the link inside the header. Your code shows the nav tag inside the anchor tag. However, it should come after it. Hope this helps.

-Kerry

Iram Pacheco Garcia
Iram Pacheco Garcia
9,099 Points

I thought it was asking me to put my nav tag after the anchor tag. When I did that without any closing tags on the nav or the ul I was able to get through just fine. I don't know why

Did you mean to make your anchor tag (IE: hyperlink) so large? It encompasses the entire list as well as the two Header tags that follow. While this is not necessarily wrong, it is unusual. It makes that whole section a hyperlink.

The question I have for you is: Where are you trying to put your closing NAV tag?

Iram Pacheco Garcia
Iram Pacheco Garcia
9,099 Points

My anchor tag was set up like that by default.

I was trying to out my closing nav tag under my closing ul tag.

Iram Pacheco Garcia
Iram Pacheco Garcia
9,099 Points

Here is the question:

Create a navigation element with an unordered list element after the link inside the header. Don’t add any list items or links just yet