Article tag in HTML5
In this article I am going to describe about the use of Article Tag in HTML5.
Article Tag
An <article> should make sense on its own and it should be possible to distribute it independently from the rest of the site. <article> tag is new in HTML5.
The <article> tag represents a component of a page that consists of a self-contained content in a document or page or application or site and that is intended to be independently distributable or reusable. This tag is used to insert the article at current page.
Content of article tag displays on browser but the content of comment tag does not.
Examples of possible content types that comes under <article> tag are:
- Forum post
- Magazine article
- Newspaper article
- Blog entry
- User-submitted comment
- Interactive widget / gadget or any other independent item of content.
Browser Support
The <article> tag is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.
Note: Internet Explorer 8 and earlier versions, do not support the <article> tag.
Syntax
Syntax of <article> tag is
<article>Content of the Article</article>
Example of <article> tag
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Article Tag in HTML5</title>
</head>
<body>
<h2>Implementation of <article> tag in HTML5</h2>
<article>
<p><a href="http://www.tutorialpoint.com">TutorialPoint:</a> This tag is used to insert the article at current page. The text inside the article tag is independent from referenced document, blog. Content of article tag displays on browser but the content of comment tag does not.</p>
</article>
</body>
</html>
Output