Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Is it appropriate to use [nav] multiple times?

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #43385
    barkins
    Member

    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

    #128208
    Paulie_D
    Member

    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._

    #128212
    Paulie_D
    Member

    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.

    #128217
    dfogge
    Participant

    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.

    #128229
    barkins
    Member

    Understood. Thank you

    Here’s a follow up question, wrapping an unordered list with the

    #128235
    Alen
    Participant

    For main [navigation I always use](http://codepen.io/anon/pen/noxDb) `ul`.

    #128238
    croydon86
    Participant

    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

    #128321
    log_in
    Member

    Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Other’ is closed to new topics and replies.