Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Alex Mosesman
Alex Mosesman
980 Points

Problem with Passing Code

I cannot figure out why my code is not passing the exercise.

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <nav>
          <ul>
            <li><a href="index.html">Portfolio</a></li>
            <li><a href="about.html">About</a></li>
            <li><a href="contact.html">Contact</a></li>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

7 Answers

Chris Gutierrez
Chris Gutierrez
6,911 Points

you are missing a closing nav tag </nav>

Chris Gutierrez
Chris Gutierrez
6,911 Points

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </nav> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Alex Mosesman
Alex Mosesman
980 Points

That doesn't seem to work either.

Alex Mosesman
Alex Mosesman
980 Points

The lack of nav closing tag didn't affect the previous exercises. Technically, the unordered list is missing a closing tag as well, but adding one doesn't seem to help me pass the exercise either.

Chris Gutierrez
Chris Gutierrez
6,911 Points

got it please see code below. you must apply the nav and ul after the link which means after the closing link </a>

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> <nav> <ul></ul> </nav> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Alex Mosesman
Alex Mosesman
980 Points

Got it! Thanks very much for the help!

Chris Gutierrez
Chris Gutierrez
6,911 Points

your welcome Alex. its why i love these courses people helping people. you can feel free to send me questions anytime.

Alex Mosesman
Alex Mosesman
980 Points

Much appreciated, Chris! :)