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 Deep Dive List Code Challenge

I somehow can't get through exercise 5 of the Code Challenge. It asks to put a nested ordered list to an already existing ul list item. This is the code I used and when looked at it in preview, it gets the job done, however i get the feedback "Bummer! Try adding the ordered list inside the list item "Shapes". (Of course i tried empty list items, but this doesn't solve the problem.) What am i doing wrong?

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

2 Answers

James Barnett
James Barnett
39,199 Points

Your ol needs to be inside a li.

<!-- A list element (i.e. <ul> or <ol> )  can only contain an <li></li> -->

<ul>
   <li>
      <ol>
         <li></li>
      </ol>
   </li>
   <li></li>
</ul>

Moz Developer Guide to List

Haha.. Wauw, sometimes the answer is so simple it hurts.. Thanks though!