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

ORDER LIST IN UNORDER LIST??

Why cant we just you

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

5 Answers

Connor Roberts
Connor Roberts
2,135 Points

Hey man if you mean what is the difference then an ordered list would look like this -

  1. This is a list
  2. This is a list
  3. This is a list

Etc. however an unordered list looks like this

?This is a list ?This is a list ?This is a list

Hope that helps :)

James Barnett
James Barnett
39,199 Points

A list (i.e. <ul> or <ol> ) can only contain have a direct child of an li element

So your nested <ol> needs to be nested inside a <li>.

Like this:

<ul>
  <li>List item one</li>
  <li>List item two (don't close the tag yet)
       <ol>
         <li>sub list item one</li>
         <li>sub list item two</li>
       </ol>
  </li> (now close List item two's tag)
  <li>List item three</li>
</ul>

HTML Dog - List Tutorial

Kazimierz Matan
Kazimierz Matan
13,257 Points

If a position of list elements matters - use ordered list. Example - 100m run results, beauty contestresults.

If a position of list elements doesn't matter - use unordered list. Example - list of candidate requirements, list of your skills.

I'm having trouble with quiz "html list" the one where you create order list in the unordered list of shapes.

Suzanne Duffin
Suzanne Duffin
6,412 Points

So am I ! I am sure my code is correct but the message comes back that the previous task item is now no longer working...

use <code> <ul> <li> shapes <ul> <li></li> </ul> </li> </ul> </code>