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

Andrew Chen
Andrew Chen
9,446 Points

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

Andrew Chen
Andrew Chen
9,446 Points

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

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>
Andrew Chen
Andrew Chen
9,446 Points

Thanks for your help and explanation! :)