HTML - tags - nav tag

revision:


Content

"nav" tag : defines navigation links syntax some examples


"nav" tag : defines navigation links

top

The <nav> tag defines a set of navigation links. Notice that NOT all links of a document should be inside a <nav> element, which is intended only for major block of navigation links.
A document may have several "nav" elements, for example, one for site navigation and one for intra-page navigation. "aria-labelledby" can be used in such case to promote accessibility. Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.

Attributes: the <nav> element supports the global attributes and events attributes.


syntax

top

b><nav> . . . </nav>


some examples

top

Codes:

                    <nav style="margin-left:4vw;">
                        <a href="/html/">HTML</a> |
                        <a href="/css/">CSS</a> |
                        <a href="/js/">JavaScript</a> |
                        <a href="/python/">Python</a>
                    </nav>
                

Codes:

                    <nav style="margin-left:4vw;"> 
                        <a href="/flamingo-facts/">Flamingo Facts</a> & bull; 
                        <a href="/flamingo-food/">Flamingo Food</a> & bull; 
                        <a href="/flamingo-species/">Flamingo Species</a> & bull;
                        <a href="/flamingo-habitat/">Flamingo Habitat</a> & bull; 
                        <a href="/flamingo-mail/">Contact Us</a> 
                    </nav>