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

Code Challenge: HTML Lists

The preview looks correct, but I'm getting an error.

Here's the question: Add a nested ordered list to the "Shapes" list item.

And this is what I have:

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

The error I'm getting: Try adding the ordered list inside the list item "Shapes"

2 Answers

Hey, your ol needs to be inside a li.

Like this:

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

Ahh, gotcha. Worked like a charm. Thanks!