
HTML article Tag
The <article>
tag in HTML is used to define a self-contained, independent piece of content within a document. It represents a complete or standalone composition, such as a blog post, a news article, a forum post, or any other content that can be considered an individual entity. The content within the <article>
tag should make sense on its own and be able to be distributed or syndicated independently.
Here is an example of how the <article>
tag can be used:
<article>
<h2>Article Title</h2>
<p>Article introduction or summary.</p>
<p>Content goes here...</p>
<p>More content...</p>
</article>
In this example, the <article>
tag encloses the content of an article. It starts with a heading (<h2>
) representing the title of the article, followed by paragraphs (<p>
) containing the article’s introduction, main content, and additional paragraphs.
The <article>
tag helps search engines, screen readers, and other systems to identify and understand the main content of a document more easily. It also aids in creating a well-structured and semantic HTML document.
It’s important to note that the <article>
tag should not be confused with the <section>
tag, which represents a thematic grouping of content within a document. While <section>
divides content into related sections, <article>
represents a complete, independent unit of content that could potentially be distributed or reused on its own.