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

Having problem with adding items to a nested ordered list

Hi Guys I am having problem with adding items(Square and Circle) to list nested under "Shapes"-Can you tell me what i am doing wrong? It's saying "It looks like Task 4 is no longer passing"

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

</body> </html>

12 Answers

You have a few minor problems there, first the opening li tag that holds Shapes should be closed right after it, and the problem with the li tag in the circle text is this, you typed <li> Circle >li>, and it should be <li>Circle</li> and right after that, the closing li tag you can remove it, no point in having a random closing tag. hope this helps =P.

Hey Guys, can some one shed some light on where i went wrong?

  1. i created ordered list
  2. i added the 3 items within the order list
  3. i created unordered list
  4. i create 2 items within unordered list
  5. i add the 3 items from the ordered list and nested it under "Shape" in the unordered list. 6.And, lastly, i added the 2 items, Square and Circle, to the list which is nested under "Shapes". I checked it twice and it looks good to me, please help. Thanks

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>
      <ol>
         <li></li>
      </ol>
   </li>
   <li></li>
</ul>

Moz Developer Guide to List

Hi Orlando, you have an extra ordered list in there. Try deleting the second "stop drop and roll" list. (everything between

           <li>Shapes
            ```  and  
        <ol>

<li> Square</li>) ``` Right now, you actually have two unordered lists nested inside the "Shapes" list item.

Hi Orlando, As far as I can tell everything looks fine so far. Perhaps you could show the rest of your code (including the aforementioned nested list)?

Thanks Leah, OK, I will do that.

h <body>

<h1>HTML Lists Challenge</h1>

<!-- Write your code below -->
<ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
</ol>
<ul>
  <li>Shapes
    <ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
</ol>
    <li>Square</li>
    <li>Circle>/li>
  </li>
  <li>Colors</li>
</ul>

</body> </html>

Hey Thanks, Victor. I will checked it for those error.

Hey Guys, I corrected the problems, but to no avail. It's still saying the same thing. "Oops! It looks like Task 4 is no longer passing." Here's my upgrading version. <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>
  <li>Drop</li>
  <li>Roll</li>
</ol>
    <li>Square</li>
    <li>Circle
  </li>
  <li>Colors</li>
</ul>

</body> </html>

'''html <!DOCTYPE html> <html> <head> <title>HTML Lists Challenge</title> </head> <body>

<h1>HTML Lists Challenge</h1>

<!-- Write your code below -->


<!-- This is the first list(ordered list) with 3 list items in it-->
<ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
</ol>

<!-- This is the second list (unordered list) with 2 list items in it-->
<ul>
  <li>Shapes
  <!-- Opening a new list (ordered list) inside a list item, the list has 2 list items -->
    <ol>
      <li>Square</li>
      <li>Circle</li>
    </ol>
  </li>
  <li>Colors</li>
</ul>

</body> </html>

''' This should help you with the task.

Hey Guys, Thanks for the help so far, but i just cannot crack this code. Everything looks good to me. I followed the instructions in the comments provided by James and Victor to a Tee, but to no avail. I need HELP!.. It's telling me" Bummer! Your nested ordered list has too many list items. Try removing some." "Shapes"-I can close my eyes and do the first five question with ease, but the sixth question i just cannot comprehend! Is it me or the machine? I need help?

<body>

<h1>HTML Lists Challenge</h1>

<!-- Write your code below -->
<ol>
  <li>Stop</li>
  <li>Drop</li>
  <li>Roll</li>
</ol>
<ul>
  <li>Shapes

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

</body> </html>

HI Leah, I just want give a big Thanks to you it works. Hallelujah!