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
Jeremy Coleman
5,449 PointsIs putting li's under li's a bad practice?
Title explains it but here is what I mean
<ul>Navigation
<li><a href="#">Navigation Sub Menu</a>
<li>
<a href="index.html">Sub Menu List Item</a>
</li>
</li>
</ul>
1 Answer
Christopher Loyd
Courses Plus Student 5,806 PointsAccording to the DOM, im going to guess that your li that's nested within the li is on the same heirarchy. (Someone correct me if I'm wrong on this)
If you're wanting to nest your lists, the below code is what you'd need.
<ul>Navigation
<li><a href="#">Navigation Sub Menu</a>
<ul>
<li>
<a href="index.html">Sub Menu List Item</a>
</li>
</ul>
</li>
</ul>
Jeremy Coleman
5,449 PointsJeremy Coleman
5,449 PointsAlright makes sense, just figured it would be tedious to add another ul if all I needed was the last set of li's.
Thank you!