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

Add a nested ordered list to the "Shapes" list item.

<!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>
      <li><ol>Shapes</ol></li>
      <li>Colors</li>
    </ul>

  </body>
</html>

7 Answers

Look at this link

Check out this demo I made to show you how nested lists work http://codepen.io/jamesbarnett/pen/IscmF

Let us know in this you have any more questions

"Building a nested list is fairly simple. Determine where a nested list should appear, and rather than closing a list item, begin a new list. Once the nested list is complete, close the wrapping list item and continue on with the original list."

from: http://learn.shayhowe.com/html-css/ordered-unordered-definition-lists#nested-lists

Oh James, thanks a lot! I start comparing and found a discrepancy on mine. Even though it looked OK, I found on your example that the parent of the next, should close after the last item nesting, so the </li> goes at the end of the list. Cheers,

Jean

<ul> <li>Shapes<ol></ol></li> <li>Colors</li> </ul>

Hello everyone, Sorry to steal your post, but i still get the same error, and I am getting what i think is a nested list. any luck?


<ul> <li>Shapes</li> <ol> <li>first</li> <li>second</li> </ol> <li>Colors</li> </ul>

</ul>

thanks

Timo Moberg
Timo Moberg
3,788 Points

This worked for me <ul>

<li>Shapes
  <ol>
     <li>first</li>
     <li>second</li>
  </ol>
</li> 
  <li>Colors</li>

</ul>