Think of <article> tag as "an article" in a newspaper, which contains heading, images (plus audio, video, maps and other embeds for a webpage), different font styles and so on. The purpose of this <article> tag in HTML is like that — it could be used for a blog entry, for entry in forum, for user submitted content, and so on. In simple words it shows independent content (i.e., for syndication).
Example:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<article>
<header> <h1> Two Stories </h1></header>
<h3> The Elephant Story </h3>
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d1/Lord_White_Elephant.jpg" alt="White Elephant">
<p> There was an elephant [...] </p>
<h3> The Camel Story </h3>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Eylcamel.jpg/220px-Eylcamel.jpg" alt="Yellow Camel">
<p> There wasn't a camel [...] </p>
<footer>
<h1> Few words </h1>
<p> Learning from above two stories is that [...] </footer>
</article>
</body>
</html>
Comments
Post a Comment