MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
  • Home
  • About
  • Contact
  • Privacy
  • Sitemap
  • BLOG
  • AFFILIATE MARKETING
    • LeadsArk
  • MORE
    • MAKE MONEY
      • ONLINE BUSINESS
      • ADSENSE
      • AFFILIATE MARKETING
    • BLOGGING
      • SEO
      • BlogSpot
      • WORPRESS
      • GOOGLE
      • COMPUTER TIPS
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DESIGN
      • HTML
      • CSS
      • BOOTSTRAP
      • JAVASCRIPT
      • JQUERY
    • WEB DEVELOPMENT
      • PHP
      • WORDPRESS
  • DOWNLOADS
    • Blogger Template
    • Wordpress Theme
    • PDF

Monday, December 31, 2018

How to use html5 nav tag?

 MyBlogHelp     December 31, 2018     html     5 comments   

html5 nav tag
NAV TAG

Introduction of HTML5 <nav> Tag

In this post, you will learn about the HTML <nav> tag which is an html5 element. It creates a section with a collection of website navigation links. html5 <nav> tag is commonly used to organize the links on the webpage or website. 

Navigation is an important element of the website. It is also called the navigation bar. Navigation links to other important webpages of the website. This is part of the core design of any website.

All links on the website can't be in the navigation bar. Only links that help the user access your website easily, should be included in navigation.

In most cases, the navigation is shown below the header. But it can also be used in the sidebar. Navigation is also displayed on all the pages of your website, just like Header so that the user can access important parts like Home Page, Blog, Services, and Contact etc. from any place in the website.

Before HTML5, developers used to design navigation bars by div element. An example of this is being given below.

<div id = "navigation">
<ul>
<li> <a href=""> Home </a> </ li>
<li> <a href=""> Blog </a> </ li>
<li> <a href=""> Services </a> </ li>
<li> <a href=""> About Us </a> </ li>
<li> <a href=""> Contact Us </a> </ li>
</ ul>
</ div>

As you can see in the example above, navigation has been created by creating lists inside the div. Div is a container element. It does not have any significant meaning. It is skipped by the search engine during the crawling. If you will create navigation in this way, search engines will have difficult to identify it. This will be bad practice in terms of SEO.

HTML5 provides <nav> tag to define the website's navigation. This tag can be easily understood by search engine crawlers and can find out which is the important section of the website. This tag also improves the SEO for your website. You can also use the <nav> tag to create breadcrumbs for an article.

Syntax of HTML5 <nav> Tag

The general syntax of the <nav> tag is being given below.
           <nav>
        // Navigation links here
          </ nav>

As you can see in the syntax above, there is not much difference between the div and nav tag syntax. But in terms of search engines, this difference is very important. Also, it is easy for the programmer to access code because a webpage can have many div elements and it will be difficult to manage so many div elements.

Attributes & Events of HTML5 <nav> Tag

<nav> tag supports all global attributes (id, class, etc) and event attributes (onmouseover, onfocus, etc.) of HTML.

How to use nav tag in html5?

Example of HTML5 <nav> tag

An example of <nav> tag is given below.



          In the above example, a header and navigation have been created. This example produces the output below.


html5 nav tag example


Compatibility with Browsers

        The HTML5 <nav> tag supports all popular browsers. Such as 

             Google Chrome 6
             Internet Explorer 9
             Firefox 4
             Safari 5
             Opera 11.1


     << PREVIOUS PAGE                                                                NEXT PAGE >>






  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

5 comments:

  1. YogeshMay 9, 2019 at 3:28 PM

    This is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
    WordPress development company in Chennai

    ReplyDelete
    Replies
      Reply
  2. Mehak ShaikhNovember 20, 2019 at 11:22 AM

    hi

    ReplyDelete
    Replies
      Reply
  3. Mehak ShaikhDecember 21, 2019 at 11:07 AM

    x

    ReplyDelete
    Replies
      Reply
  4. Mehak ShaikhJanuary 4, 2020 at 4:49 PM

    zcx

    ReplyDelete
    Replies
      Reply
  5. KathyFebruary 19, 2020 at 7:13 PM

    Thanks for giving an Excellent Blog, it's very useful information to us, keep on it doing like this, I eagerly waiting for your updates, Thank you So much...
    ProWeb365

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Thank you for reading this post. Please do not enter any spam link in the comment box.

Followers

Blog Archive

  • ►  2020 (4)
    • ►  October (1)
    • ►  September (1)
    • ►  August (2)
  • ►  2019 (52)
    • ►  December (1)
    • ►  November (2)
    • ►  October (1)
    • ►  August (1)
    • ►  July (1)
    • ►  May (11)
    • ►  April (10)
    • ►  March (6)
    • ►  February (3)
    • ►  January (16)
  • ▼  2018 (54)
    • ▼  December (27)
      • How to use html5 nav tag?
      • How to install Google Fonts on your Blogger Blog?
      • How to use section tag in html5?
      • How to use meter tag in html5?
      • How to use time tag in html5?
      • How to use header tag in HTML5?
      • How to use figure tag in html5?
      • How to use aside tag in html5?
      • How to use details Tag in HTML5?
      • How to use wbr tag in html5?
      • How to use article tag in HTML 5 ?
      • How to use menu tag in html?
      • How to use base tag in HTML?
      • How to use HTML hr and br Tag?
      • How to use HTML address tag?
      • How to use HTML Meta Tags?
      • How to use HTML script & noscript Tag?
      • How to use DOCTYPE declaration in HTML?
      • How to use Form Tag in HTML?
      • How to use Block and Inline Tags in HTML?
      • How to use Lists in HTML?
      • How to use Image Tag in HTML?
      • How to use Table Tag in HTML?
      • How to use anchor Tag in HTML?
      • How to Format & Style in HTML?
      • How to use Heading in HTML?
      • What is Attribute in HTML?
    • ►  November (5)
    • ►  May (5)
    • ►  April (4)
    • ►  February (3)
    • ►  January (10)
  • ►  2017 (17)
    • ►  December (9)
    • ►  November (8)

Popular Posts

  • How to use the main tag in html5?
  • How to use keygen tag in html5?
  • How to use html5 mark tag to highlight text?
  • How to start Online Business without money from home?
  • What is a search engine?

Contact Us

Name

Email *

Message *

About MyBlogHelp

Most of the posts, we share on this blog related to Affiliate Marketing, Organic Lead Generation, Digital Marketing, Social Media Marketing, Make Money Online, SEO, and web design.

Featured Post

LeadArk - Affiliate Marketing | Qualified Organic Lead Generation | LeadsArk Review

Copyright © MyBlogHelp– A Blog for Digital Marketing, Affiliate Marketing, Organic Lead Generation.
Design by Md. Abdussamad | MyBlogHelp.com