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

How do you add a nested ordered list

I try and try but I cant get it

3 Answers

Brandon

I think the following would be an example of a nest ordered list

<ol>
<li>Coffee</li>
<li>Tea
<ol>
<li>Black tea</li>
<li>Green Tea<li>
</ol>
</li>
<li>Milk</li>
</ol>
Jaka Dirnbek
Jaka Dirnbek
7,046 Points

Well you have an ordered list ( List 1 )

<ol>
  <li>Something</li>
  <li>List 1</li>
</ol>

and another ordered list ( List 2 )

<ol>
  <li>List 2</li>
  <li>Abc</li>
</ol>

When you replace "Something" (a string) in "List 1" with an ordered list "List 2" then "List 2" is nested in the original list "List 1".

<ol>
  <li>
    <ol>
      <li>List 2</li>
      <li>Abc</li>
    </ol></li>
  <li>List 1</li>
</ol>

Thanks that Helped Alot