The <article>
tag is one of the semantic HTML5 tags that is used to define a self-contained piece of content on a web page. It is used to mark up a section of content that can stand alone and be syndicated, shared, or reused independently of the rest of the page. The content within the <article>
tag should be related to a single topic or subject and should be able to be read and understood on its own.
The <article>
tag is often used for blog posts, news articles, product reviews, and other types of content that can be published on their own. It is also used to mark up content that is repeated on multiple pages, such as a list of articles or a series of blog posts.
When using the <article>
tag, it is important to remember that it should not be used for content that is not self-contained or that is not related to a single topic or subject. For example, a navigation menu or a footer should not be marked up with the <article>
tag.
Here are some examples of how the <article>
tag can be used:
<article>
<h2>My Blog Post</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac mauris sit amet augue bibendum bibendum. Nulla facilisi. Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
<p>Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
</article>
<article>
<h2>Breaking News: Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac mauris sit amet augue bibendum bibendum. Nulla facilisi. Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
<p>Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
</article>
<article>
<h2>Product Review: Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac mauris sit amet augue bibendum bibendum. Nulla facilisi. Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
<p>Sed euismod, velit vel bibendum bibendum, velit velit bibendum bibendum, vel bibendum bibendum velit vel bibendum bibendum.</p>
</article>
As you can see from these examples, the <article>
tag is used to mark up self-contained pieces of content that can stand alone and be shared or reused independently of the rest of the page.