Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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