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

charlotte green
charlotte green
1,773 Points

Task one is no longer passing....doing everything right then this comes up when adding portfolio, about and contact

So I dd, <nav> <ul> </ul> absolutely fine, I then add <li> portfolio</li>, about and contact inbetween and it keeps coming up with task one is no longer passing? Not sure what is going wrong

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>

5 Answers

Billy Bellchambers
Billy Bellchambers
21,689 Points

Good spot Paul.

The issue lies here.

<!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>  <--- your nav and list items are inside the closing </a> element. 
                     * this is the line where your nav should start see above in my code example I posted first of all*
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Billy Bellchambers
Billy Bellchambers
21,689 Points

Looks like you missing a closing nav tag to me.

<!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>
          <li>Portfolio</li>
          <li>About</li>
          <li>Contact</li>
        </ul>
      </nav>  <- this was missing which is why first task was now failing
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
charlotte green
charlotte green
1,773 Points

I also tried putting that in, and it still comes up with task one is no longer passing

Paul Ryan
Paul Ryan
4,584 Points

In the original code you posted, your anchor tag is covering the entire nav. Have you fixed this?

charlotte green
charlotte green
1,773 Points

Ah right, that seems to have worked! Thanks guys! So I just want to clarify, when its saying to me "make a list" or whatever at the end of a link, I'm looking for the end of the anchor? </a>

Billy Bellchambers
Billy Bellchambers
21,689 Points

Yes as it asked for it after the link. Your code needs to start after the closing anchor element.

What you had wrote was code inside the anchor and therefore inside the link.

charlotte green
charlotte green
1,773 Points

I get it now. :-) Thanks guys