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

Balazs Szilagyi
PLUS
Balazs Szilagyi
Courses Plus Student 5,945 Points

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

something is wrong with my code, by any chance that you see what I don't? thanks in advance:

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

3 Answers

For your new ordered list to be nested inside your Shapes list item, you have to put the ordered list before the closing </li> tag of your Shapes list item. The way you posted it seems like it should work, but technically you're incorrectly creating a new ol list and attaching it to the parent unordered list instead of the Shapes list item. Below is the correct code.

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

See how the Shapes closing tag comes after your nested list.

The ol has to be nested inside the Shapes li element:

<li>Shapes
   <ol></ol>
</li>