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

Code Challenge won't let me through when I'm sure i got it correct

It tells me to create three list items within thee nag element and write Portfolio, About, and Contact. So this is how i do the code:

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

What did I do wrong?

2 Answers

Stone Preston
Stone Preston
42,016 Points

you need to put the list items in <li></li>tags and your list items need to be between <ul></ul>

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

also be sure you put your nav after the closing anchor tag, not inside it:

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

...and i feel so stupid right now. Thanks!

Chris Shaw
Chris Shaw
26,676 Points

Nothing to feel stupid about, even after 5 years I make mistakes, it's just a natural part of development.