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

Anand Swamy
PLUS
Anand Swamy
Courses Plus Student 2,368 Points

I added a nested ordered list in Shapes in the following code but it's still not accepting. Am I missing something?

<ul> <li>Shapes</li> <ol> <li>One</li> <li>Two</li> <li>Three</li> </ol> <li>Colors</li> </ul>

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


    <h1>HTML Lists Challenge</h1>

    <ol>
      <li>Stop</li>
      <li>Drop</li>
      <li>Roll</li>
   </ol>

    <!-- Write your code below -->


    <ul>
      <li>Shapes</li>
      <ol>
        <li>One</li>
        <li>Two</li>
        <li>Three</li>
      </ol>
      <li>Colors</li>
    </ul>


  </body>
</html>

2 Answers

Steven Parker
Steven Parker
231,261 Points

:point_right: The children of a list element (ul or ol) should all be list items (li).

If you add another element, including another list, to a list item it should be completely inside the list item tags.

Depending on the browser, your code might be displayed so that it appears the same, but the challenge mechanism is directly examining the code.

Anand Swamy
Anand Swamy
Courses Plus Student 2,368 Points

Treehouse corrected it, but I had the same exact code in it. I wonder if it's a malfunction?

Brian Foley
Brian Foley
8,440 Points

Hello, try putting the nested <ol></ol> items before the closing </li> tag for Shapes.

Anand Swamy
Anand Swamy
Courses Plus Student 2,368 Points

Tree corrected it, but I had the same exact code in it. I wonder if it's a malfunction? Thanks for your comment and time!