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

Code Challenge Difficulty

I am having difficulty with task 3 on the codechallenge

James Barnett
James Barnett
39,199 Points

Post what code you have so far.

4 Answers

Laura Cressman
Laura Cressman
12,548 Points

Hi Miron, I went to the code challenge, and I'm assuming you are referring to the task where you add an unordered list below the ordered list. To do that, you simply add empty unordered list tags, like <ul></ul>. The instructions also say to not delete the ordered list, so that could be where you are running into problems. Try something like I'm posting below, and let me know if that helps!

```<!DOCTYPE html> <html> <head> <title>HTML Lists Challenge</title> </head> <body>

<h1>HTML Lists Challenge</h1>

<!-- Write your code below -->
<ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
</ol>
<ul>
</ul>

</body> </html>

Thanks, however I am talking about when you put an unordered list into an ordered one. Thanks.

Laura Cressman
Laura Cressman
12,548 Points

In that case, you simply next the <ul></ul> tags inside the ordered list. Check out the example below and let me know if that makes sense :)

    <ol>
      <li>Bananas</li>
      <li>Apples</li>
        <ul>
          <li>Red</li>
          <li>Green</li>
          <li>Yellow</li>
        </ul>
      <li>Strawberries</li>
    </ol>

I did exactly that but it said I made a mistake!

Laura Cressman
Laura Cressman
12,548 Points

Would you mind copying and pasting your code over?

<!DOCTYPE html> <html> <head> <title>HTML Lists Challenge</title> </head> <body>

<h1>HTML Lists Challenge</h1>

<!-- Write your code below -->
<ul>
   <li>Shapes
    <ol>
      <li></li>
      <li></li>
     </ol>
  </li>
   <li>Colors</li>
</ul>
    <ol>
  <li>Stop</li>
  <li>Drop</li>
   <li>Roll</li>
</ol>

</body> </html>

Laura Cressman
Laura Cressman
12,548 Points

I see that you are missing the closing </li> tag after the word "shapes", and instead you have it after the </ol> tag. Can you move the closing </li> tag so it is after shapes? This would look something like this.

<!-- Write your code below -->
<ul>
   <li>Shapes</li>
    <ol>
      <li></li>
      <li></li>
     </ol>
   <li>Colors</li>
</ul>
    <ol>
  <li>Stop</li>
  <li>Drop</li>
   <li>Roll</li>
</ol>

I did that but it says task two is no longer functioning.

Laura Cressman
Laura Cressman
12,548 Points

OK, I think I found the bug. It wouldn't let me pass unless the Stop, Drop, and Roll list came before the Shapes and Colors list. Once I tried this, however, it worked. It seems like you understand the concept, but just need to pass the challenge. Try this and let me know if it works.

    <ol>
      <li>Stop</li>
      <li>Drop</li>
      <li>Roll</li>
    </ol>
    <ul>
      <li>Shapes
            <ol>
          <li>Square</li>
          <li>Circle</li>
        </ol>      
      </li>
      <li>Colors</li>
    </ul>

Yeah thanks a lot, it works!