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

WHY is this wrong?

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <nav> <ul> </ul> </nav> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Paul, Are you trying to do the the code challenge on making an unordered List? Need more information on what your trying to do.

Hi David Sorry about the vauge question, Hi I have created a navigation element with an ul element after the link inside the header but I get its wrong. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <nav> <ul> </ul> </nav> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> </header> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

8 Answers

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

You need to add the nav element after the link element has been closed (</a>).

Wayne Priestley
Wayne Priestley
19,579 Points

Paul, your missing a > at the end of your nav tag

Hey Paul!

To create navigation with unordered lists your code should be as follows:

<ul>
  <li>Home</li>
  <li>About</li>
  <li>Portfolio</li>
</ul>

Try using this code to complete the challenge! If you can't get it to work comment back and I shall further assist you.

Also, for future reference, refer to the markdown cheatsheet when you want to post code because, as you can see, the code in your post isn't properly formatted.

Hope you have a great day!

-Luke

Hi Thanks for that. I didn't understand the question properly.

I'm glad you managed to get the problem solved.

Good luck with the rest of your site!

-Luke

Hi its still coming up as wrong. I have put the nav element after the first link but I get the same error

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <nav>
            <ul>
              <li>Home</li>
              <li>About</li>
              <li>Portfolio</li>
            </ul>
          </nav
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Paul, Did you include the <nav></nav> around the unordered list

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Paul,

I've edited your code so it appears correct in your post.

Here is a link to explain how to use Markdown to post your code How to post code If you look at the bottom of the box when your typing a reply you will see Markdown Cheatsheet that will also explain how to post your code

Hope this helps.

      <nav>
        <ul></ul>
      </nav>

the first challenge doesn't require you to put anything in the unordered list. Hope this helps

-David

Hi I have created a navigation element with an ul element after the link inside the header but I get its wrong.

Question


Create a navigation element with an unoreded list element after the link inside the header. Don' add any list items yet.

The error Be sure your <nav> element is directly after the link in the header

My Code

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <nav>
          <ul></ul>
        </nav>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Still getting the same error.

Wayne Priestley
Wayne Priestley
19,579 Points

I've edited your code so it appears correct in your post.

Hi David and everyone else

Now I understand it thanks for all of your patirnce.

I'm glad you managed to get your problem sorted. Remember to mark a best answer so that people know that your problem has been solved!