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

Willie Allison
Willie Allison
2,035 Points

How do you add a nested ordered list inside a unordered list item?

I think the programming checker has a bug or I am missing the entire lesson.

index.html
<!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>Shapes</li>
      <ol>
        <li>Stop</li>
      </ol>
      <li>Colors</li>
    </ul>

  </body>
</html>
Bill Roberts
Bill Roberts
8,337 Points

I'm not sure where in your code you want to put it, but it sounds like you want something like this. It should go between the <li> and </li> tags which are between the <ul> and </ul> tags.

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

2 Answers

Hi,

You almost have it. Your code currently looks like:

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

but will need to change so the nested ol is within a list item, e.g.

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

Hope that helps

-Rich

No problem. This video at the 2.57 mark should help explain it too.

-Rich

Check out this previous post https://teamtreehouse.com/forum/is-there-something-wrong-with-code-challenge-or-my-coding-please-check-below-image-link-httpsnaggyjsdxtjpg

It is because it looks like they are wanting you to place to ol inside the li tag