Article Tag
The <article> tag represents an article. This tag specifies independent self-contained content. An article should make sense on its own and it should be possible to distribute it independently from the rest of the site. This tag is used to insert an article at the current page.
The content of the article tag displays in the browser whereas the content of the comment tag will not be displayed. The <article> tag is introduced in HTML5. HTML4.01 does not support the <article> tag.
An example of possible content type in an <article> tag are:
- Newspaper article
- Magazine article
- Forum post
- Blog entry
- User comment
Syntax
Syntax of <article> tag in HTML5:
<article>Content of the article</article>
Browser Support
The <article> tag is supported in Internet Explorer 9, Firefox, Opera, Chrome, and Safari.
Internet Explorer 8 and earlier versions, do not support the <article> tag.
Example of Article Tag in HTML5
<!DOCTYPE html>
<html>
<head>
<title>Article and Address Tag in HTML5</title>
</head>
<body>
<!--Implementation of Article Tag in HTML5 -->
<article>
<h1>Article Tag in HTML5</h1>
Article Tag is used to insert the article at the current page.
<ul>
By using article tag we can perform a lot of operations
<li>Forum Post</li>
<li>Blog Post</li>
<li>News</li>
<li>Comment</li>
</ul>
</article>
<hr/>
<footer style="color:Blue">
This article has been written by Ashwani Tyagi.
</footer>
<hr/>
</body>
</html>
Output
Address Tag
The <address> tag defines the contact information about the owner of the article or document. The <address> tag must not be used to represent any postal address, unless the address represents the contact information. In order to display the postal address, we simply use the <p> tag.
If the address tag is inside the <body> element, it represents the contact information about the document and if the <address> tag is inside the <article> element, then it represent the contact information about that article. Usually, text inside the <address> tag occurs in italic form.
<address>tag cannot contain <article>,<nav>,<aside>,<header>,<footer>,<section> tags.
Syntax
Syntax of <address> tag in HTML5
<address>Content of the address</address>
Browser Support
The <address> tag is supported in all major browsers.
Example of Address Tag in HTML5
<!DOCTYPE html>
<html>
<head>
<title>Article and Address Tag in HTML5</title>
</head>
<body>
<!--Implementation of Address Tag in HTML5-->
<address>
<h1>Address Tag in HTML5</h1>
<a title="Posted By Ashwani" href="mailto:[email protected]">mcn solution</a><br>On February 6,2013
</address>
<hr/>
<footer style="color:Blue">
This article has been written by Ashwani Tyagi.
</footer>
<hr/>
</body>
</html>
Output