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

Tyler Eagan
Tyler Eagan
6,438 Points

Error for this challenge

Hi everybody I am receiving an error on this challenge that says... Bummer! The Portfolio list item should link to "index.html".

Here is my code;

            <li><a href="index.html">Portfolio</a></li>

Am I missing something here?

Thanks!

hmmm, that looks right to me. I ran through the challenge and passed it. Here's my nav code, maybe that will help?

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

4 Answers

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hi Tyler Eagan,

It looks like you're putting the nav element inside of the anchor, and not after it as the instructions say in Task 1. It also looks like you're not properly closing the nav or the ul elements.

Make sure you close those elements, and put the nav after the anchor element in the header.

Tyler Eagan
Tyler Eagan
6,438 Points

Great that worked, thanks you very much! Weird that it let me pass the first challenge when that was wrong.

Maybe I should stick to graphic design :S

Thanks again, Tyler

Chris Shaw
Chris Shaw
26,676 Points

Hi Tyler,

Could you please post the entire nav element HTML as I tried the challenge and couldn't replicate the issue you're having.

Tyler Eagan
Tyler Eagan
6,438 Points

Hi Chris, Thanks for the quick response here is the entire nave element.

<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>
Tyler Eagan
Tyler Eagan
6,438 Points

Thanks Riley! I copied and pasted your code just to see if there was any change and there wasn't. It is still giving me the same error.

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hi Tyler Eagan,

Sorry to hear you're having trouble. Which task in the Code Challenge is giving you a problem?

If it's the first task, make sure that you're placing the <nav> element inside the header, just after the anchor element. Also, make sure that you don't add links until it asks for them.

Tyler Eagan
Tyler Eagan
6,438 Points

Hi Nick thanks for the response. It is actually code challenge 3 of 3. I can get through challenge 1 and 2 fine.

Here is the entire code that I am submitting for challenge 3. The error says "Bummer! The Portfolio list item should link to "index.html". I've also tried submitting this in different browsers as well as a different computer.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <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>
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
    </header>
    <section></section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Thanks!