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 Organize with Unordered Lists

On the Creating HTML Content - Challenge for Unordered Lists - The Second Code challenge is not working for me at all!

I need help here please, what am I doing wrong with Task 2?

Also, when I enter this in, it says that the Task 1 is now not valid after adding the following code:

<section>
  <nav>
    <ul>
      <li><img src="img/numbers-01.jpg" alt=""></li>
      <li><img src="img/numbers-06.jpg" alt=""></li>
      <li><img src="img/numbers-12.jpg" alt=""></li>
    </ul>
  </nav>
</section>

Your help would be appreciated, I cannot get past it!

Cheers,

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><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>
      <nav>
        <ul>
          <li><img src="img/numbers-01.jpg" alt=""></li>
          <li><img src="img/numbers-06.jpg" alt=""></li>
          <li><img src="img/numbers-12.jpg" alt=""></li>
        </ul>
      </nav>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

6 Answers

I would try it without wrapping the <ul> in the <nav> tag. So something like this...

<section>
  <ul>
    <li><img src="img/numbers-01.jpg" alt=""></li>
    <li><img src="img/numbers-06.jpg" alt=""></li>
    <li><img src="img/numbers-12.jpg" alt=""></li>
  </ul>
</section>

cheers

Matt Harris - Thanks so much, that one got me through it alright!

Nick Pettit - How come we don't use the <nav> tags in this instance, yet it passed me alright with the Task 1?

Cheers all who commented!

Ben Brenton
Ben Brenton
266 Points

What error message is coming up when your task 2 isn't working? This usually gives you a clue into what you might be doing wrong.

Also, when task 1 is no longer working, this usually means you have changed something while doing the next task which has since invalidated task 1. Go back on yourself and see whether this is the problem.

@Ben thanks for the quick reply - Here's what I put for Task 1 - all checks out OK and passes (this is verbatim code)

<!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> <nav> <ul> <li></li> <li></li> <li></li> </ul> </nav> </section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Then I do this and chance the img src links x 3 for each, and it bums out with that error that Task 1 failed??

<!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> <nav> <ul> <li><img src="img/numbers-01.jpg" alt=""></li> <li><img src="img/numbers-06.jpg" alt=""></li> <li><img src="img/numbers-12.jpg" alt=""></li> </ul> </nav> </section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

Ben Brenton
Ben Brenton
266 Points

Can you just remind me what the tasks are asking you to do? May give me a better idea on what to look for? On the surface the coding looks good though.

Ben Brenton
Ben Brenton
266 Points

Can you just remind me what the tasks are asking you to do? May give me a better idea on what to look for? On the surface the coding looks good though.

Matt Harris - Thanks so much, that one got me through it alright!

Nick Pettit - How come we don't use the <nav> tags in this instance, yet it passed me alright with the Task 1?

Cheers all who commented!

If i remember task 1 you were using a 'list' to build a navigation, hence why it was wrapped in the 'nav' tags.

You usually (but not definitely) only have one set of these 'nav' tags on a page, in task 2 you were just constructing a list of content and therefore didn't need to wrap it in the 'nav' tags.

cheers