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

"how to make a website" challenge problem: I complete Task 1, then have problems completing task 2. help!

When I add my <nav> and <ul> elements in task 1 everything seems fine, when I add the list items in task 2, it says I have messed up the work from task 1, which asks me not to create list items. How do I continue forward? What am I missing?

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>

4 Answers

Aamir Mirza
Aamir Mirza
25,077 Points

Hi,

I just checked the code challenge for myself. I think the reason your task 1 isn't passing is because you haven't placed your (nav) tags after your link (/a) tag.

So instead of

<a href="index.html">
        <nav>
          <ul>
            <li>Portfolio</li>
            <li>About</li>
            <li>Contact</li>
          </ul>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>

Try

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

Hopefully that will work.

Much thanks, this is all still so new to me, so I am easily getting lost in my own typings. Thank you very much I will try this out.

Thank you! I was able to continue. That was very helpful showing an example of HOW my code was out of line. I greatly appreciate the time you took to help me out!

Hey Pete,

I think I found the issue. You placed the nav and ul tags right after the opening anchor tag. If you place them below the closing anchor tag you should be able to complete that part of the challenge. This will also allow you to use that closing nav tag you couldn't before.

Hope this helps!

Thank you very much!

rydavim
rydavim
18,814 Points

Welcome to Treehouse!

When you insert your nav element, make sure that you're opening the tag after the end of the link section.

<header>
      <a href="index.html">
        <nav> // you've got your nav element here, inside the link tag
          <ul>
            <li>Portfolio</li>
            <li>About</li>
            <li>Contact</li>
          </ul>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
      // try putting it down here, after the tag has been closed
    </header>

Thank you so much! (I didn't expect to get so many response so quickly. Nerd brothers in arms ftw!)

Jeffrey Ruder
Jeffrey Ruder
6,408 Points

Hello,

I think the problem is that you have deleted the end tag of the nav element. I don't see it anywhere in your code.

Good luck!

That's the weird part, it won't let me complete task one if I include the end tag element for nav. I seem to be beating my head against a wall.

Also thank you for the quick response. So here's what happens, if i add a closing </nav> element where it should go, it will not let me go to task 2. Once I get to task 2 (after leaving an open-ended nav element), i add the <ul></ul> and <li></li> elements where they should be (I reviewed the video again just to make sure) it says I no longer have what was asked of me in task 1. It seems like a repeating error, and I feel that everything is where it should be though, so I just don't know how to proceed