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

Task 1 no longer passing

Trying to complete a code challenge,

I get that task 1 is no longer passing after it correctly greets me with it being write?

I am told to make an list item in my ol after task1, which i do but can't carry on, what am i doing wrong?

heres the code:

05c768d59964299a222e08bd950baabf?s=22&d=https%3a%2f%2fstatic.teamtreehouse.com%2fassets%2fcontent%2fdefault avatar Challenge Task 2 of 3

Inside the navigation element, create three list items with the words, “Portfolio”, “About”, and “Contact”. Don’t add links yet. Oops! It looks like Task 1 is no longer passing. Get Help Recheck work Go to task One 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> <nav> <ul> <li>Portfolio</li> <li>About</li> <li>Contact</li> </ul> </a> </header> </nav> <section></section> <footer> <p>© 2013 Nick Pettit.</p> </footer> </body> </html>

If it's telling you to create an ordered list you need to use the ol tags not the ul tags. ul is for unordered lists

2 Answers

Hi,

Without a link to the challenge itself it's a little bit of a guess but I'd say it's the order of the tags in this section:

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

Notice the closing nav tag is outside the closing header and also included within the anchor tag. If I remember right (although this is just from memory) the challenge asks you to add the ul within a nav element after the anchor tag.

Based on that the above would look like this for stage 1:

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

and this for stage 2:

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

Hope that helps :)

-Rich

Thank you for the help, it worked! :)

However now its saying i haven't linked to index.html page.. but have?

///<nav> <ul> <li a href="index.html">Portfolio</li></a> <li a href="about.html">About</li></a> <li a href="contact.html">Contact</li></a> </ul> </nav> ///</header>

No problem.

The new error looks to be caused by the following:

<li a href="index.html">Portfolio</li></a>
  <li a href="about.html">About</li></a>
   <li a href="contact.html">Contact</li></a>

You're merging the li and the a tags. Try changing them to:

<li><a href="index.html">Portfolio</li></a>
  <li><a href="about.html">About</li></a>
   <li><a href="contact.html">Contact</li></a>

-Rich

Your a genius.. So does this have to be the case all the time? Or is it the weird syntax on Treehouse?

No you'll need to do that all the time.

w3schools is a great resource if you need to check anything HTML-wise too. You can find details on Links here and Lists here.

Also, separate to the question but, this post details how to add code to your post should you need it in future.

Hope that helps :)

-Rich