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

HTML How to Make a Website Creating HTML Content Use the Navigation Element

Do we need to use <ul><li>...</li></ul> when we are using <nav>...</nav> tags?

I read somewhere (http://www.quora.com/What-is-the-use-of-nav-tag-in-HTML) that one of the uses of the <nav> element is to make the lists redundant

3 Answers

Lush Sleutsky
Lush Sleutsky
14,044 Points

Not sure what your question is exactly. Your wording is very hard to understand what exactly you are trying to accomplish, but when making a nav, do it this way:

<nav>
  <ul>
     <li>Item 1</li>
     <li>Item 2</li>
     <li>Item 3</li>
     ......
  </ul>
</nav>

Nothing redundant about that, and there is really no other way to make a proper nav menu with more than one item. This is semantically correct, easy to decipher what is going on, and no reason not to do it utilizing best practices...

Hi,

Thank you for your reply. I am sorry for the ambiquity in the wording.

I was trying to understand the utility of the nav tag, and (wrongly) thought that this element allows users to make menu items w/o the use of the ul tag.

I now understand that it is mainly for semantics.

Lush Sleutsky
Lush Sleutsky
14,044 Points

Glad I could help! Thanks for the upvote...

Sergey Blokhin
Sergey Blokhin
9,612 Points

Why do we need to us <ul> for navigation?