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

Jessica Pehrson
Jessica Pehrson
1,648 Points

afterI check the work for task 1 it says well done, then i check the work for task 2 it says task 1 now wrong

Idk what i am doing wrong for task 1 vs task 2. im stuck on how to do task 2

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> Portfolio <li>
            <li> About <li>
            <li> Contact <li>
          </ul>
      </a>
        </nav>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

2 Answers

Anthony Babich
Anthony Babich
5,505 Points

Here's the correct code for the first challenge; (nav bar/links need to be after the closing a tag)

<!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>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Jessica... Welcome to Treehouse.

Often when the challenge tells you "Task one is no longer passing," it usually means you added something to the current task that is wrong and is affecting the code checker from the beginning.

For this challenge, you do have a couple of syntax and tag errors.

First, your <a> tag should be closed before you open the <nav>. Once that's done delete the closing a tag you do have under the unordered list.

Finally, you didn't close your <li> tags. You have an opening on both sides.

WIth those two things corrected, you will be able to move on to task 3.

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

Keep Coding! :)