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

Having trouble creating three line elements inside navigation. Please help

It looks as if everything is set up correctly.

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

Did you close the nav element beneath the last a element? probably this is why ity’s not working. also you need the closings around the ul. the generell syntax for an html element is:

<example>......</example>
<nav>
        <ul>
          <li>portfolio</li>
          <li>contact</li>
          <li>about</li>
        </ul>
      </nav>

keep me posted if this works.

cheers, to

1 Answer

Peter Kullmann
Peter Kullmann
14,267 Points

You did get the syntax almost right, but you simply have to declare the list items starting with upper-case letters.

This will make your code pass, however there is a tiny problem with your navigation: You did not close either the nav nor the ul tag. Browsers often forgive such tiny mistakes and still display your website correctly, but closing the tags correctly is definitely recommended.

Here is, what a unordered list with three list items within a navigation element should look like:

<nav>
  <ul>
    <li>Number One</li>
    <li>Number Two</li>
    <li>Number Three</li>
  </ul>
</nav>

wow! thanks so much!!