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

Melissa Alam
Melissa Alam
859 Points

Nested Ordered list to "Shape" list

What am I doing wrong?

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

    </ol>

  <li>Colors</li>
</ul>

4 Answers

Melissa Alam
Melissa Alam
859 Points

I found the error I made. Thank you for your help!

Is that all your html? I'm not totally sure what you're trying to accomplish but is this what you're looking for?

<ol> <li>numbered list 1</li> <li>numbered list 2

    <ul>
        <li>unordered list 1</li>
        <li>unordered list 2</li>
        <li>unordered list 3</li>
    </ul>
</li>
<li>numbered list 3</li>

</ol>

of if you're wanting to accomplish it in css... li { list-style-type: circle; }

John Steer-Fowler
PLUS
John Steer-Fowler
Courses Plus Student 11,734 Points

Hi Melissa,

I can't even see your shapes list in the code you provided.

I am going to provide you with the answer, but I will explain how it works so you understand it fully.

What you are looking for is something like this:

<ol>
      <li>Stop</li>
      <li>Drop</li>
      <li>Roll</li>
</ol>
<ul>
      <li>Shapes
        <ol>
             <li>Square</li>
             <li>Circle</li>
        </ol>
      </li>
      <li>Colors</li>
</ul>

Here I am 'nesting' the ordered list (ol) within the Shapes list. Nesting the list means putting the ordered list 'within' the Shapes list.

I hope this helps, I can explain more if needed :D

Melissa Alam
Melissa Alam
859 Points

Thanks! I do so but it won't let me go on to the next task

John Steer-Fowler
John Steer-Fowler
Courses Plus Student 11,734 Points

My example is merely showing you how to nest elements such as lists. Would you be able to paste in your code currently, and I can advise based on your exact code?

Please refer to the Markdown Cheatsheet to see how to show your code.