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

nav code challenege

I have no idea where I'm going wrong. I thought I was perfectly fine with nav, ul, ol, li tags.

<header>
    <a href="index.html">
    <nav><ul></ul></nav>
    <h1>Nick Pettit</h1>
    <h2>Designer</h2>
  </a>
</header>

Any ideas guys?

Steve Wamsley
Steve Wamsley
7,977 Points

What is the problem?

The only thing I see is that you are not providing any <li> elements in your <ul> tag. I suspect you have no navigation because you don't have any list items in your unordered list to display in the nav.

Chris Dziewa
Chris Dziewa
17,781 Points

The requirement was to leave the list empty for the moment. It looked correct at first to me until I saw that the anchor tag spanned several lines.

2 Answers

Chris Dziewa
Chris Dziewa
17,781 Points

If you look at your code, You have placed your nav element inside of the anchor tag. It is kind of strange for the formatting, but Nick probably just didn't want to repeat the same code for the link. Take what you typed and place it after the closing anchor like so:

<header>
    <a href="index.html">
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
    </a>
    <nav><ul></ul></nav>
</header>

Thank you very much. I feel very stupid for such a trivial mistake.