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 17, 2018

How to use article tag in HTML 5 ?

 MyBlogHelp     December 17, 2018     html     No comments   


article-tag-in-html5
ARTICLE-TAG-IN-HTML5


HTML5 <article> Tag

1. Introduction of HTML5 <article> tag
2. Syntax of HTML5 <article> tag
3. Attributes of HTML5 <article> tag
4. Example of HTML5 <article> tag

Introduction to HTML5 <article> Tag

The header, footer and sidebar in the website can be the same on different pages but the article is unique on every page.

The article is the section of a website that contains the main content and which is most important to the user. On the basis of this section of your website, you get a ranking in search engines.

The content of the <article> tag is independent of the rest of your website content. That is, this content does not require other content. As there are different articles in the newspaper and these are all independent, so every article tag on your website is independent.

An article usually contains headings and paragraphs. Headings and paragraphs are defined by <h1> and <p> tags respectively. The HTML syntax of an article is as follows.

Syntax of HTML5 <article> tag

<article>
<h1> Heading </ h1>
<p> This is a paragraph. </ p>
</ article>

Sub headings (<h2>, <h3> etc.) are also used as required in an article. The footer can be also define in the <article> element. As shown below.

<article>
<h1> Heading </ h1>
<p> This is a paragraph related to main heading </ p>
<h2> Sub Heading </ h2>
<p> This is a paragraph related to subheading </ p>
<article>

Attributes of HTML5 <article> Tag

There is no element specific attribute of the <article> tag. But this tag supports all global attributes such as id, class, title etc.
<article id = "HTMLTutorial">
</ article>

Similarly, you can use other global attributes with <article> tag.

Styling <article> Tag

Like any other HTML element, you can also apply CSS rules to the <article>. You can define the width, color, and display of the article by CSS.

article
{
             width: 920px;
            color: # 272727;
             display: block;
}

As you can see in the syntax above, styles are applied by CSS on the <article> element. Similarly, you can apply many more CSS rules on this tag.

<article> Event Attributes

<article> element supports all global event attributes like onclick, onfocus, etc. By handling these events, you can make the web page interactive.

<article onclick = "script-code-here">

As you can see in the syntax above, onclick event attribute has been defined in the <article> element. Similarly, you can also define other event attributes.

Example of HTML5 <article> tag.



As you can see, in the above example, the main heading has been created inside the <article> element and later a paragraph has been added after that a subheading and a paragraph has been added again.

Similarly, more headings and paragraphs can be added in an <article> element. The above script generates output as below.



article-tag-in-html5
ARTICLE-TAG-EXAMPLE


Previous:- How to use base tag in HTML?

Next:- How to use wbr in HTML5?





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

0 Comments:

Post a Comment

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