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

me need helllppppppp.

how do i do this!

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

3 Answers

the anchor tag for link should be added like this

      <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>
Jeff Lemay
Jeff Lemay
14,268 Points

The anchor tags < a > should be inside the list items < li >. You also have 2 opening < ul > tags.

thank you Jeff for correcting it.

Jonathan Chua
Jonathan Chua
4,136 Points

The first thing I would do is clean up your code. This makes it easier for you to visualize the structure of your page and it helps others read it when they need to work with it. I'll show you how I would write it and then write some explanations below it.

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

Each element should be nested so you can see where each section begins and ends. Indent lines using a consistent method (two spaces, four spaces, etc.) so that opening and closing tags line up and there is a clear separation from one element to the next.

It looks like the place where you got tripped up was adding the links. Remember that links are defined by the <a> tag. The href attribute determines where the link will take you. Whatever you write in between the opening <a> and closing </a> tags is what the text of the link will be. All of that, then, gets nested inside of the list item <li> tag so it shows up in your unordered list.

If you get stuck on a challenge, re-watch the previous video. That will get you unstuck 9 out of 10 times.