Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Why do we use unordered list for nav menus
I was just curious as to why we use unordered list in the navigation menu. can we not just use a main-nav div and then each nav items as separate divs inside? Is there any advantage of using unordered lists? because we end up removing the default list styling anyway. Thanks
Seems it's just been used so often it has become the standard (you could probably get away with anchor tags) and it's become easier for screen readers mainly.
I am not sure as I have yet to try creating a navigation list using the div element instead of the ul, but I think the ul being a block element would require less CSS code. I suppose if each list item were a div there would be more flexibility of design. I will have to try it!