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

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! :)