- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
On a website with multiple menus, sub-menues, etc, is it appropriate to use multiple nav tags, or just use it once and for the others use unordered lists?
Thanks
Per HTML5Doctor.com
>NAV:
>Represents navigation for a document. The nav element is a section containing links to other documents or to parts within the current document.
>Not all groups of links on a page need to be in a nav element — only **groups of primary navigation links**. In particular, it is common for footers to have a list of links to various key parts of a site, but the footer element is more appropriate in such cases._
Nav can be used multiple times on a page in HTML5.
CAN…yes
SHOULD…probably not.
I’ve always worked in the basis that the NAV tag is only for the **primary** page/site navigations.
If my main (header) navigation area is used for the [nav] then any other menus can be in divs.
according to the spec it’s not inappropriate to use the nav tag multiple times on a page.
i tend to only use it for the primary site navigation, not inter-page navigation, but that’s just a personal preference.
Understood. Thank you
Here’s a follow up question, wrapping an unordered list with the
For main [navigation I always use](http://codepen.io/anon/pen/noxDb) `ul`.
Any of the new HTML5 elements can be used multiple times, apart from the new MAIN element, which can only be used once.
I would say main navigation, footer navigation and breadcrumb would be good use cases for the NAV element.
@barkins – I would personally wrap the UL in a NAV if navigation. So NAV>UL>LI
Thanks