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

Raphael Reiter
Raphael Reiter
6,820 Points

nested list

im stuck... can someone tell me again how to add an ordered list nested in a list item contained in an unordered list? :/

2 Answers

Codin - Codesmite
Codin - Codesmite
8,600 Points
    <ul>                    <!-- Unordered List -->
      <li>Shapes            <!-- List Item Containing Ordered List -->
        <ol>                <!-- Ordered List -->
          <li>Square</li>   <!-- List Item -->
          <li>Circle</li>   <!-- List Item -->
        </ol>               <!-- Ordered List Close -->
      </li>                 <!-- List Item Containing Ordered List Close -->
      <li>Colors</li>       <!-- List Item -->
    </ul>                   <!-- Unordered List Close -->

Added Comments to show what each tag is for.

Do you mean like this?

<p><h2>A Nested List</h2>

<ul>
  <li>Coffee</li>
  <li>Tea
    <ol>
    <li>Black tea</li>
    <li>Green tea</li>
    </ol>
  </li>
  <li>Milk</li>
</ul></p>