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 trialDoug Allen
1,605 Pointsnested order list
nested order list inside shapes list
<!DOCTYPE html>
<html>
<head>
<title>HTML Lists Challenge</title>
</head>
<body>
<ol>
<li>Stop</li>
<li>Drop</li>
<li>Roll</li>
</ol>
<ul style="list-style-type:disc">
<li>Shapes</li>
<ol>
<li>Shapes</li>
<li>Colors</li>
</ol>
<li>Colors</li>
</ul>
<h1>HTML Lists Challenge</h1>
<!-- Write your code below -->
</body>
</html>
2 Answers
Chyno Deluxe
16,936 PointsTwo things are incorrect in your challenge. your ordered list in outside of the list item and your ordered list items are not what the challenge is asking for. View Below
<ul style="list-style-type:disc">
<li>Shapes
<ol>
<li>Square</li>
<li>Circle</li>
</ol>
</li>
<li>Colors</li>
</ul>
I hope this helps
Jason Anders
Treehouse Moderator 145,860 PointsHi Doug. Welcome to Treehouse!
First off, be careful adding things to the challenge's code that was not asked for: I'm not sure why you added style=list-style-type:disc
. It wasn't asked for. You also added a second "Shapes" and "Colors" to the second list you are to create. For this challenge, it seems to not affect anything, but most challenges will not let you pass if you delete preloaded code or add anything that wasn't asked for. You will soon find the challenges are very picky and strict.
As for your question: The challenge wants you to add on ordered list inside of the list element containing "Shapes", so you would have to put this inside the <li> tags--after the opening one, but before the closing one. Right now you have is outside of the list element.
The code should look like this:
<ol>
<li>Stop</li>
<li>Drop</li>
<li>Roll</li>
</ol>
<ul>
<li>Shapes <!-- no closing tag, because you need the ordered list inside -->
<ol>
</ol>
</li>
Hope this helps. Keep Coding! :)