Article and Address Tags in HTML5


Content: In this article I will describe to you the functionality of Article and address tag in HTML5.

Description:

By using the <article> tag we can do a lot of the below operations.

  • Forum post
  • Newspaper article
  • Blog entry
  • User comment

Below I am giving an example use for the <article> tag.

Step 1:

<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<td>
<article>
<a href="/UploadFile/b19d5a/6644/">Shirsendu nandi Article Sites in c-sharocorner</a>
<br />
This is test html5 demo article tag
</article>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>

Step 2: Now save the textfile in to the .html format. After that open the webpage and see the below sites.

HTML1.gif


Now when you click on the link it will show the desired article in your websites.

HTML2.gif

Now I will show you the usefulness of the <address> tag.

The HTML <address> tag is used for indicating an address, usually related to authorship of the current document, or a section of the document.
If the tag applies to the body element, then it applies to the whole document .

The <address> tag cannot contain <article>, <aside>, <nav>, <section>, <header>, <footer>, <hgroup>, <h1>-<h6> or other <address> elements

Below I am giving you an example of the <address> tag

<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<td>
<address>
Mail to Shirsendu:<br />
<a href="mailto:[email protected]">shirsendu nandi</address>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</body>
</html>

See in the above "<a href section I have written a code"mailto:".It means when you click the link
on the particular mail id you can write your mail id.

Now run the web page it will look like the below picture

HTML3.gif

Now when you click on the "shirsendu nandi" link it will look like the below picture

HTML4.gif

So you can write your mail on the desired window open.

Conclusion: So in this article we have get learned the <article. And <address> tag in html5.

I have attached the two sample webpage.

Up Next
    Ebook Download
    View all
    Learn
    View all