Welcome to the Treehouse Community
Looking to learn something new?
Stage 3 Lists - Adding a nested ordered list inside an unordered one
I have had a lot of issues trying to get through the code challenge for Stage 3 Lists. It says to add items and what it seems to mean is replace (that is the only way that I have gotten this far in the challange.
I am on the Adding a nested ordered list inside an unordered one. Here is the code that it keeps telling me is wrong, please let me know what I'm doing incorrectly.
<ul> <li>Shapes</li> <ol> <li>Stop</li> <li>Drop</li> <li>Roll</li> </ol> <li>Colors</li> </ul>
Celestial Goldsmith It is a bit hard. But there is no need to worry about. Let me explain in a way that you can understand easily.
Challenge one is to create ordered list. In HTML, to create an ordered list we should use opening and closing <ol> element. Something like this.
In challenge 2, you have been asked to add list items. You can add items to ordered list using opening and closing <li>. Something like this.
<ol> <li>Stop</li> <li>Drop</li> <li>Roll</li> </ol>
The reason why I add <li> inside <ol> is I wanted items to be numbered.
Challenge 3 is about creating unordered list. To create an unordered list in HTML document, you should use opening and closing <ul> element. Something like this.
There is a small thing wrong in your code is
ordered list is not a child to list item. What I mean is, check the below code.
<ul> <li>Shapes <ol> <li>Stop</li> <li>Drop</li> <li>Roll</li> </ol> </li> <li>Colors</li> </ul>
If ordered list is not child to list item then it become sibling to list items and direct child to unordered list. So you will have to nested inside list item.
I hope it helps.
Thank you! I think I understand now.