- <hr> tag
- <nav> tag
- <pre> tag
- Anchor tag
- Article tag
- Attributes
- Audio tag
- Blink tag
- Block elements
- Blockquote
- Bold
- Buttons
- Center text
- Comment
- Data attribute
- Div
- Entities
- Font color
- Font size
- Footer
- Form
- Global attributes
- iFrame
- Images
- Inline elements
- Inline style attribute
- Input element
- Italic
- Label
- Line break
- Linking local webpages
- Links
- Marquee tag
- Metadata
- Ordered lists
- Paragraph tag
- Script tag
- Select
- Semantic elements
- Space
- Span tag
- Strikethrough
- Style tag
- Table
- Textarea
- Underline
- Unordered lists
- Video tag
HTML
HTML Article Tag: Syntax, Usage, and Examples
The HTML article tag is a semantic element used to enclose self-contained content that can stand on its own or be reused elsewhere. You’ll often use it for blog posts, news stories, product listings, documentation entries, or user-generated content like comments. The HTML article tag helps give meaning and structure to your content and improves accessibility and SEO by making the purpose of each content block clear.
How to Use the Article Tag in HTML
The basic syntax of the article tag in HTML is simple:
<article>
<h2>5 Tips for Writing Better Code</h2>
<p>Writing clean and maintainable code requires discipline and good habits...</p>
</article>
The <article>
element wraps content that’s intended to be independently distributable or reusable, whether as a full web page, an RSS feed entry, or a standalone feature on a landing page.
It can contain headings, paragraphs, images, videos, forms, blockquotes, and even nested articles.
When to Use the HTML Article Tag
Use the HTML article tag when the content makes sense on its own. If the content could be published as a standalone item—either inside or outside your site—it belongs inside an <article>
element.
Publishing Blog Posts
Each blog post on a website should be enclosed in an <article>
tag, especially if you're displaying multiple entries on one page.
<article>
<h2>Understanding JavaScript Closures</h2>
<p>Closures allow functions to retain access to their outer scope...</p>
</article>
This marks the blog entry as self-contained content.
Structuring News Feeds
News websites often use the article tag in HTML for headlines and stories:
<article>
<h2>Breaking: New Tech Unveiled</h2>
<p>Today at the developer conference, a new wearable device was announced...</p>
</article>
Even if multiple stories appear on the same page, each one stands alone in an <article>
.
Displaying User-Generated Content
Comments, reviews, or testimonials submitted by users are good candidates for the article tag HTML:
<article>
<h3>Review by Alice</h3>
<p>I love how intuitive this product is. It saved me hours of work!</p>
</article>
This structure lets each entry be addressed independently.
Examples of Article Tag HTML in Action
Article Inside a Blog
<article>
<header>
<h2>Why Learn HTML5?</h2>
<p>By John Doe, Published April 2025</p>
</header>
<p>HTML5 introduced semantic elements that help structure web content more effectively...</p>
<footer>
<p>Tags: HTML, Web Development</p>
</footer>
</article>
The use of <header>
and <footer>
within <article>
helps organize the content clearly.
Article with Embedded Media
<article>
<h2>Exploring Iceland: A Travelogue</h2>
<img src="iceland.jpg" alt="Landscape in Iceland">
<p>Iceland’s natural beauty is breathtaking, with its glaciers, waterfalls, and geysers...</p>
</article>
Articles can include any content you’d place in a standard HTML document, including images and other media.
Nested Articles
In some situations, an article might contain other articles—for example, a blog post with embedded comments:
<article>
<h2>10 Ways to Stay Focused While Coding</h2>
<p>Distractions can ruin your flow, but with these strategies, you can stay productive...</p>
<article>
<h3>Comment by Marcus</h3>
<p>This is really helpful. The Pomodoro method works wonders for me!</p>
</article>
</article>
While nesting isn’t required often, it is allowed and can help define content hierarchies.
Learn More About the Article Tag in HTML
What Makes Content a Good Fit for <article>
?
The key question is: can this piece of content be republished or shared independently of the rest of the page?
If yes, wrap it in an article tag. If the content only makes sense in the context of the surrounding page—like a sidebar, navigation, or utility section—it likely belongs in another tag like <section>
, <aside>
, or <div>
.
How to Use Article Tag in HTML with Other Semantic Elements
The <article>
tag often works alongside other semantic tags:
<section>
for grouping related articles<aside>
for side content like ads or bios<header>
for article metadata<footer>
for author info, categories, or share buttons
Example:
<section>
<h1>Latest Articles</h1>
<article>
<h2>How to Use CSS Grid</h2>
<p>CSS Grid Layout is a two-dimensional layout system...</p>
</article>
<article>
<h2>Making Accessible Forms</h2>
<p>Accessibility in forms ensures all users can interact with your content...</p>
</article>
</section>
This creates a well-structured page that’s easier for both users and search engines to understand.
Article Tag vs Section Tag
Although both <article>
and <section>
organize content, they serve different purposes. The article tag HTML wraps standalone content, while the <section>
tag groups related content that contributes to a broader topic.
So if you're writing one blog post, use <article>
. If you're grouping a set of blog posts under a category, use <section>
to wrap them all.
SEO and Article Tag HTML
Search engines use semantic tags like <article>
to better understand your content hierarchy. If you want Google or other search engines to treat your blog entries, product listings, or stories as distinct entities, the article tag in HTML is essential.
It also helps with rich results and can improve your site's appearance in search listings.
Styling Articles with CSS
You can style articles using CSS to distinguish them visually. Here’s a simple layout:
article {
border-bottom: 1px solid #ddd;
padding: 20px 0;
margin-bottom: 20px;
}
article h2 {
font-size: 1.5em;
margin-bottom: 10px;
}
This layout separates articles with spacing and a light border for readability.
Adding Metadata to Articles
For better organization and semantic clarity, include publication dates, author names, or categories inside <header>
or <footer>
elements within the article:
<article>
<header>
<h2>The Power of HTML Semantics</h2>
<p>By Jane, published on April 8, 2025</p>
</header>
<p>Semantic HTML improves structure, SEO, and accessibility...</p>
<footer>
<p>Filed under: HTML, Frontend Development</p>
</footer>
</article>
This gives context to both users and screen readers.
Accessibility Considerations
Articles, especially in dynamic environments, benefit from added attributes like aria-labelledby
or aria-label
when headings aren’t used. Always include a heading like <h2>
or <h3>
inside your article to help screen readers navigate the content effectively.
Avoid putting form controls, navigation links, or unrelated scripts inside your <article>
unless they are part of the standalone content.
Using the HTML article tag helps you create better-structured, more meaningful web content. It lets you clearly define which parts of your page are self-contained pieces, improves readability, and enhances your site’s accessibility and search performance.
Sign up or download Mimo from the App Store or Google Play to enhance your programming skills and prepare for a career in tech.