HTML <article>
query_builder | Christopher PisaniIntroduced in HTML5, the <article> element is meant to be used for posts like a forum post, news article, blogs and magazine's post to name the few. It makes it easier, especially on search engines to understand what kind of document is being presented.
The <article> element can hold multiple articles, within an article element. A heading <h1> - <h6> is required for every instince. When multiple articles are inside an <article> element, a heading for the main article is needed, followed by a heading inside each article, in the main article.
Important Note :
The article tag should always contain a heading(h1-h6) to define the article, and so do the articles within it.
A simple example :
<article class="title">
<h1>Blog Post Example</h1>
<article class="replies">
<h2>Reply 1</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
<p>
Posted <time datetime="2015-06-31 19:00">June 31</time> by John Doe.
</p>
</article>
<article class="replies">
<h2>Reply 1</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</p>
<p>
Posted <time datetime="2015-06-31 19:00">June 31</time> by John Doe.
</p>
</article>
</article>
Available Attributes
No specific attributes are assigned for this element, other than the standard global attributes.