What is the `<nav>` tag?

In 14/14, the <nav>-tag suddenly appears in the code, without a proper introduction. Without the the page seems to be working fine. Can somebody explain?

HTML tags are not functional, but semantic. Their meaning can be found in the tagname. NAV says what its children represent, navigation links. It is a sectioning element for flow content; i.e., links.

Something to keep close by when learning HTML is the chapter on elements.

the NAV element

36 Likes

Yes, is there any other explanation of NAV?
Why do we need to use the NAV tag when we are already using these

<nav/> is a semantic tag that tells the user agent to look for adjoining pages on the site; or, perhaps content segments in the page. At the very least it says, β€œthese are links to other content.”

14 Likes

Hello everyone,
Do we usually use the element as parent to

    or
    elements? or we can use it as well with

    element ?
    For ex:


or

  <nav>
       <p><a href="//https:......etc"></a></p>
 </nav>

Are they both correct or not? Im getting a bit confused as I read that " not all groups of links on a page need to be in a nav element β€” only sections that consist of major navigation blocks are appropriate for the nav element. "
Thank u

Hello everyone,
Do we usually use the nav element as parent to ul and ol elements?or we can use it as well with p element?

For ex:

or

Are they both correct or not? Im getting a bit confused as I read that " not all groups of links on a page need to be in a nav element β€” only sections that consist of major navigation blocks are appropriate for the nav element. "
Thank u

HTML <nav> tags contains a group of navigation links. It is used to create a navigation bar on a website or a section of the HTML document. It can also be applied on unordered list and ordered list tags, which would still point you to other webpages or to different sections of the same webpage.

For my fellow beginners, I think this is the most basic way to explain it. I hope this video helps! :grinning_face_with_smiling_eyes:
Html 5 tutorial - 10 - Using Nav element

5 Likes

Thanks for the explanation! I think i get it a bit more now :laughing:

1 Like