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

Unable to pass task 3

Hi! I've linked my portfolio & other items to the appropriate links but still can't seem to pass task 3 (Link each of the three list items. Portfolio should go to “index.html”, About should go to “about.html”, and Contact should go to “contact.html”).

The help says "Bummer! The Portfolio list item should link to "index.html" but I still can't figure out what I'm doing wrong.

Would appreciate if someone can help! :)

index.html
<!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>
        <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>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

2 Answers

Hello, you have not closed your "ul" tag :)

 <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>
</ul>

Hope this helps!

Kind Regards

Erdrag

Hey, thanks for your quick reply! I've added the ul and nav closing tag and the code still isn't working. I even copied in your code into my workspace and the error still persists.

Oh okey try this

<header>
      <a href="index.html">
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
        <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>
          </ul>
         </nav>
    </header>

you had a closing anchor tag at the wrong place, this should work! try it out:)

Kind Regards

erdrag

Thanks! This worked!

Shane Meikle
Shane Meikle
13,188 Points

Below your header, you have an opening anchor tag pointing to index.html. You are closing it below the UL tags. You need to get rid of that closing tag, and the opening anchor tag below the header.

Here is what it should look like:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
        <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>
          </ul>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Thanks for your help and explanation! :)