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

Friday, January 4, 2019

How to use the main tag in html5?

 MyBlogHelp     January 04, 2019     html     2 comments   

main tag in html5
USE OF HTML5 MAIN TAG

Introduction of <main> Tag in HTML5

Different tags are provided in HTML5 to specify headers, articles, and footers. Through these HTML tags, we know what the header content is and what the footer content is. Similarly, HTML5 gives you the <main> tag to specify the main content of the document.

The <main> tag is a new element in HTML5 which represents the main content area in the document. The content inside the tag should always be unique. For example in this element, you can specify an article by <article> element because the articles are unique in different webpages.

The <main> tag should not contain any content that is repeated. In this tag, you should not include the content below.

                1. In this tag, you can not include sidebars.
                2. You should not include navigational links inside the main tag.
                3. Website header and logo can’t be inserted in the main tag.
                4. You must not include search bar and copyright information in this tag.

<aside>, <header>, <footer> and <nav> tags should not be specified in the <main> tag. Also the <main> tag should also not be defined in these tags.

One thing to note is that you should not define more than one <main> element in a webpage. If you try to do this then the w3c throws validator error.

Syntax of HTML5 <main> Tag

The main syntax of the tag is given below.

<main>
// Content
</ main>

Like other HTML5 tags, the <main> tag is also introduced, so all browsers do not support it and they have no layout that how to display <main>. In such a situation, you should keep in mind that <main> always be displayed like block level elements. You can do this by CSS.

main
{
                        display: block;
}

Attributes of <main> Tag in HTML5

<main> tag supports all the global attributes (class, id etc.) and event attributes (onmouseover, onclick, etc) provided by HTML.

How to use the main tag in html5?

Example of HTML5 <main> Tag




The above example produces the below output.


main tag example
MAIN TAG EXAMPLE

Compatible Browsers

         Fully supported browsers are given below for this <main> tag.
      
               1. Firefox 4.0
               2. Google Chrome 6.0
               3.  Internet Explorer 12.0
               4. Opera 11.1
               5. Safari 5.0

     << PREVIOUS                                                                                        NEXT >>





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

2 comments:

  1. AnonymousJune 5, 2019 at 2:51 PM

    Magnificent goods from you, man. I have understand your stuff previous to and you're just extremely magnificent.
    I actually like what you've acquired here, really like what you are stating and the way in which you say it.

    You make it entertaining and you still take care of to keep it wise.

    I can not wait to read much more from you. This is really a great web site.

    ReplyDelete
    Replies
      Reply
  2. AnonymousJuly 1, 2020 at 6:26 PM

    Pretty nice post. I just stumbled upon your weblog and wanted to say
    that I've truly enjoyed browsing your blog posts. After all I'll
    be subscribing to your feed and I hope you write again very soon!

    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)
      • What is bootstrap and its major advantages of crea...
      • What is CSS? CSS Tutorial 01
      • How to use input attributes in html5?
      • How to use input type in html5?
      • How to use output tag in html5?
      • How to use keygen tag in html5?
      • How to use datalist tag in html5?
      • How to use svg tag in html5?
      • How to use canvas tag in HTML5?
      • How to use the track tag in html5?
      • How to use source tag in html5?
      • How to use embed tag in html5?
      • How to use the main tag in html5?
      • How to use Ruby tag in html5?
      • How to use html5 mark tag to highlight text?
      • How to use html5 footer tag?
  • ►  2018 (54)
    • ►  December (27)
    • ►  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