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 trialMichelle Mok
3,488 Pointsnested lists.
for challenge task 5 of 6, would this coding be acceptable for nested lists?
<ul>
<li>Shapes</li>
<ol>
</ol>
</ul>
4 Answers
Dino Paškvan
Courses Plus Student 44,108 PointsThe ordered list needs to be nested inside the Shapes li
element:
<ul>
<li>
Shapes
<ol></ol>
</li>
<li>Colors</li>
</ul>
Jason Anello
Courses Plus Student 94,610 PointsHi MIchelle,
The nested <ol>
has to be contained inside your li
So it should come after "Shapes" but before your closing </li>
The only direct children of a <ul>
are <li>
's or scripts. You can't have a <ol>
as a direct child of a <ul>
Michelle Mok
3,488 PointsThanks!
Would the same format apply if the <ul> element were to be nested within an <ol> element? Is this correct?
<ol>
<li>
Shapes
<ul></ul>
</li>
<li>Colors</li>
</ol>
Dino Paškvan
Courses Plus Student 44,108 PointsYes, it would.
Also, please note that when posting code on the forums, you have to wrap it with three backticks (```), so that it's visible and properly formatted. I've edited your post to add them.
Check the Markdown Cheatsheet (under the post text area) for more info and an example of usage.
Michelle Mok
3,488 PointsI was wondering about how to show the code. THANKS!!