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

Joe Seager
Joe Seager
166 Points

Basic list element not working

Hi there

Just trying to add three basic list elements to my code (extreme beginner, as you can probably tell). Please cold someone help me out with why it isn't working? Thank you.

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

4 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Joe,

We were all "beginners" at one point. :)

It is because you are using the wrong tags to create your list. You are using <ul> for the list elements. UL stands for "Unordered List" and the opening tag is used to tell the document that you are starting an Unordered List.

The items in the list will be surrounded by <li> tags. LI stands for "List Item." So, the list items go between the list type. In your case, the li tags for your list go between opening and closing ul tags:

<nav>
  <ul>
      <li>Portfolio</li>
      <li>About</li>
      <li>Contact</li>
  </ul>
</nav>

Hope that makes sense. Keep Coding! :)

Andrew Rodman
Andrew Rodman
9,681 Points

Make sure to wrap your list items inside of an un-ordered list!

Joe Seager
Joe Seager
166 Points

Wow I am dumb. Thanks Andrew!

Joe Seager
Joe Seager
166 Points

Thanks Jason. Can you tell I'm on my free trial?

Andrew Rodman
Andrew Rodman
9,681 Points

No worries Joe! I am too...

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

No worries. It wasn't that long ago I was as well.

A pointer for the forum... if/when an answer satisfies your question completely, could you mark it "Best Answer" as this lets others in the forum know that your question was resolved. Up-voting is a great way to show you appreciate other contributions as well.

And, HAPPY CODING in your endeavor! :)