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

I'm not sure what's wrong, but I believe that I have nested "shapes" as a order list correctly please help.

I'm not sure what's wrong, but I believe that I have nested "shapes" as a order list correctly please help.

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

    <h1>HTML Lists Challenge</h1>

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

    </ol>
    <ul>
      <ol><li>Shapes</li></ol>
    <li>Colors</li>
    </ul>


  </body>
</html>

You are close but you start an unordered list <ul> and then immediately started another ordered list. Try starting your list, then your list item. You can then add your nested item within your list item<li>Shapes</li>

8 Answers

Hi Ricardo,

Did you get through this challenge in the end? The help Steve Tenpas provided should have worked for you - did it not?

The code at the point you've stated, Add a nested ordered list to the Shapes list item would look like the code below. The next part of the challenge adds list items to that ordered list:

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

Let us know how you get/got on as, if there's a problem, we need to get to the bottom of it.

Steve

hmmm. Not sure what the problem might be. Can you post your correct code here. Your earlier example wasn't correct. If you now have the correct answer and you are still having problems you might want to close your browser , re-open and try again. I know I had some issues about a year ago

The challenge was to add a order list inside the un-order list which I did.

<ul>
      <ol><li>Shapes</li></ol>  
    <li>Colors</li>
    </ul>

// To nest the ordered list inside "Shapes" list the <li> tag should be first and before you close off your </li> you insert
 // your nested <ol></ol>.

My <ol></ol> go on the outside and <li></li> inside the order list if I'm correct. I pre view the page and it was nested. When I check my work it sends me back to the previous question saying it wrong. Then I check the previous answer and its correct once I re check it and the same process happens over and over again.

Think of it the same way you would make a list on a piece of paper. First you would start your list. Then you would list your first item "Shapes" (<li>Shapes Next you want to start your ordered list, so do that on a new line before you close your Shapes item (before the </li>). Does that help?

I understand that <li></li> go within ether <lo></lo> or <lu></lu> because your listing them inside of them. The challenge question made me do it how you explained it which you are correct. But on the following question they make me put "shapes'' into a order list within the un-order list. Which i have done but when checking the answer it makes me go back to the previous question saying its wrong? After it just said it was right?

So your embedded list should look something like this. If you still have problems just restart your browser and do the challenge again. Sometimes this stuff gets a little frustrating but stick with it

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

    </ul>

I have tried it all. This is the exact challenge: "Add a nested ordered list to the "Shapes" list item ".

Not sure how to help further. Perhaps you can try: https://teamtreehouse.com/support

The other thing I would do when stuck is go back over my code letter by letter. More often than not I found that I over looked a symbol or typed something incorrectly. Good luck.

thanks Hunter and Tenpas you guys were very helpful.

Good luck Ricardo. I'm still working my way through the HTML and CSS stuff myself. Keep asking questions. I found the people here to be very helpful and really knowledgeable.

Brian Pedigo
Brian Pedigo
26,783 Points

Hi Ricardo, In your original post you placed the ordered list tags outside of the line item tags. It looks like Steve posted a very helpful comment that explained that already. But in case, the below code is how I passed the code challenge. Happy coding!

<!DOCTYPE html>
<html>
  <head>
    <title>HTML Lists Challenge</title>
  </head>
  <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>Square</li>
          <li>Circle</li>
        </ol>
      </li>
      <li>Colors</li>  
    </ul>

  </body>
</html>