HTML - tags - n....

revision:


Content

"nav" tag : defines navigation links "noscript" tag : defines alternate content when scripts are not supported


"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 : <nav> . . . </nav>

some examples

example

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>
                

example

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>
                
                

"noscript" tag : defines alternate content when scripts are not supported

top

The <noscript> tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn't support script. The <noscript> element can be used in both "head" and "body". When used inside "head", the "noscript" element can only contain "link", "style", and "meta" elements.

Attributes: the <noscript> element supports the global attributes.

Syntax : <noscript> . . . </noscript>

some examples

example
code:
                    <script>
                        document.write("Hello World!")
                    </script>
                    <noscript>Sorry, your browser does not support JavaScript!< /noscript>
                
code:
                    <script  language="javascript" type="text/javascript">
                        document.write('JavaScript is enabled. Disable your JavaScript then reload this page');
                    </script>
                    <noscript>
                        Your browser doesn't support JavaScript or you have disabled JavaScript. Therefore, 
                        here's alternative content...
                    </noscript>