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
Brian Gallagher
9,074 PointsNested lists - Question 5
Hi, in question 5 we're asked to create a nested ordered list inside the shapes list item. Can anyone tell me what I'm doing wrong? Thanks
<ul> <li>Shapes</li> <ol> <li>abc</li> <li>def</li> </ol> <li>Colors</li> </ul>
4 Answers
Brian Gallagher
9,074 PointsSorry Adam, I haven't added code to forum before. Hopefully this will do it
<ul>
<li>Shapes</li>
<ol>
<li>abc</li>
<li>def</li>
</ol>
<li>Colors</li>
</ul>
```
Alexander Wilhelm
Courses Plus Student 3,771 PointsSorry, i really have to look how to post code.
But Adams answer is right.
Adam Moore
21,956 PointsI made this mistake many times before trying to do something like this. What happens at the end of the "Shapes" list item when you put the </li> closing mark is completely close that list item. So when you put your <ol> underneath the "Shapes" list item, it isn't nested, it's simply placed beneath the "Shapes" list item. Therefore, what you need to do is do this:
<ul>
<li>Shapes
<ol>
<li>abc</li>
<li>def</li>
</ol>
</li>
<li>Colors</li>
</ul>
This way, your "Shapes" list item (<li>) begins before the word "Shapes" and ends(</li>) just after the end of the nested ordered list.
Brian Gallagher
9,074 PointsBrilliant! Never spotted that before. Thanks a million
Adam Moore
21,956 PointsNo problem!
David Thomas
Courses Plus Student 21,263 PointsLooks like you need to move that first closing li after the ol
<ul>
<li>Shapes
<ol>
<li>abc</li>
<li>def</li>
</ol>
</li>
<li>Colors</li>
</ul>
Adam Moore
21,956 PointsAdam Moore
21,956 PointsYou're going to have to put the code in here; otherwise, I'm not really sure what may be causing the code to fail the challenge. If you need help with knowing how to do it, you can click the "Markdown Cheatsheet" link below each forum text area.