Introduction to HTML
HTML is used to structure web pages.
Clear, interactive, and structured HTML lessons designed for beginners.
The HTML <article> element represents a
self-contained piece of content that can be understood and used
independently from the rest of the page.
<article> for content that could stand on its own,
such as a blog post, news article, product review, forum post,
tutorial, or other independent content.
The <article> element is a semantic HTML element
used for independent and self-contained content.
<article>
<h2>Introduction to HTML</h2>
<p>
HTML is used to structure web pages.
</p>
</article>
HTML is used to structure web pages.
The main purpose of <article> is to identify
content that can exist independently.
Common examples include:
<article>
<h2>Learn HTML</h2>
<p>
Learn HTML from basic to advanced concepts.
</p>
</article>
An article can contain a <header> for its
introductory content.
<article>
<header>
<h2>Introduction to HTML</h2>
<p>
Published on October 1, 2026
</p>
</header>
<p>
HTML is the standard markup language for web pages.
</p>
</article>
An article can also contain a footer for information related specifically to that article.
<article>
<header>
<h2>HTML Basics</h2>
</header>
<p>
Learn the fundamentals of HTML.
</p>
<footer>
<p>
Updated October 2026
</p>
</footer>
</article>
<article>
<header>
<h2>
Learn HTML From Scratch
</h2>
<p>
Author: Training Team
</p>
</header>
<p>
HTML provides the structure of a web page.
</p>
</article>
The <time> element can be used to represent
the publication date.
<article>
<header>
<h2>
Introduction to HTML
</h2>
<p>
Published:
<time datetime="2026-10-01">
October 1, 2026
</time>
</p>
</header>
<p>
HTML is used to structure web pages.
</p>
</article>
A page can contain multiple independent articles.
<main>
<article>
<h2>HTML Basics</h2>
<p>
Learn HTML fundamentals.
</p>
</article>
<article>
<h2>HTML Forms</h2>
<p>
Learn how to create HTML forms.
</p>
</article>
<article>
<h2>Semantic HTML</h2>
<p>
Learn semantic HTML elements.
</p>
</article>
</main>
A section can contain multiple related articles.
<section>
<h2>Latest Tutorials</h2>
<article>
<h3>HTML Basics</h3>
<p>
Learn HTML fundamentals.
</p>
</article>
<article>
<h3>HTML Forms</h3>
<p>
Learn HTML forms and validation.
</p>
</article>
</section>
Articles are commonly placed inside the main content area.
<main>
<article>
<h2>Introduction to HTML</h2>
<p>
HTML provides structure for web pages.
</p>
</article>
</main>
Articles can contain related independent content when the document structure requires it.
<article>
<h2>HTML Tutorial</h2>
<p>
Learn HTML step by step.
</p>
<article>
<h3>Student Comment</h3>
<p>
The tutorial was easy to understand.
</p>
</article>
</article>
<article>
<header>
<h1>
How to Learn HTML
</h1>
<p>
Author: Web Development Team
</p>
</header>
<p>
HTML is the foundation of web page structure.
</p>
<p>
Start by learning elements, attributes and forms.
</p>
<footer>
<p>
Category: Web Development
</p>
</footer>
</article>
<article>
<header>
<h2>
New Web Development Course Announced
</h2>
<p>
Published:
<time datetime="2026-10-01">
October 1, 2026
</time>
</p>
</header>
<p>
A new web development learning program is now available.
</p>
</article>
<article>
<h2>
Product Review
</h2>
<p>
This review covers the main features and usability
of the product.
</p>
<p>
Overall, the product provides useful features
for everyday users.
</p>
</article>
<article>
<header>
<h3>
How do I create a form in HTML?
</h3>
<p>
Posted by Student
</p>
</header>
<p>
I want to learn how to create HTML forms.
</p>
</article>
<article>
<h2>
HTML Document Structure
</h2>
<img src="html-structure.png"
alt="HTML document structure">
<p>
This diagram shows the basic structure of an HTML document.
</p>
</article>
<article>
<h2>
HTML Structure
</h2>
<figure>
<img src="html.png"
alt="HTML structure diagram">
<figcaption>
Basic HTML document structure
</figcaption>
</figure>
</article>
<main>
<section>
<h2>
Latest Posts
</h2>
<article>
<h3>
HTML Basics
</h3>
<p>
Learn the basic concepts of HTML.
</p>
<a href="/html-basics">
Read More
</a>
</article>
<article>
<h3>
HTML Forms
</h3>
<p>
Learn how to create HTML forms.
</p>
<a href="/html-forms">
Read More
</a>
</article>
</section>
</main>
| Element | Main Purpose |
|---|---|
<article> |
Represents independent, self-contained content. |
<section> |
Groups related content around a common theme. |
| Element | Meaning |
|---|---|
<article> |
Semantic element for independent content. |
<div> |
Generic container without a specific semantic meaning. |
Semantic article elements provide meaningful structure to independent content and can help assistive technologies understand the organization of a page.
<article>
<h2>
HTML Forms
</h2>
<p>
Learn about HTML form controls.
</p>
</article>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>
My Blog
</title>
</head>
<body>
<header>
<h1>
My Web Development Blog
</h1>
</header>
<nav>
<a href="#">
Home
</a>
<a href="#">
Tutorials
</a>
<a href="#">
About
</a>
</nav>
<main>
<section>
<h2>
Latest Articles
</h2>
<article>
<header>
<h3>
HTML Basics
</h3>
<p>
Published:
<time datetime="2026-10-01">
October 1, 2026
</time>
</p>
</header>
<p>
Learn the fundamentals of HTML.
</p>
<footer>
<p>
Category: HTML
</p>
</footer>
</article>
</section>
</main>
<footer>
<p>
© 2026 My Web Development Blog
</p>
</footer>
</body>
</html>
Not every content block needs to be an article.
Use <article> when the content can be considered
independent or self-contained.
If content is simply a thematic grouping within the current document
and is not independently distributable, a
<section> may be more appropriate.
When a content block represents a self-contained article, using
<article> communicates its purpose more clearly
than a generic <div>.
<article> for self-contained content.<section> when the content is grouped by theme rather than independence.<article> only for visual styling.Create a blog page containing two independent articles. Each article should have a title, author, publication date, content, and footer information.
<main>
<section>
<h2>
Latest Articles
</h2>
<article>
<header>
<h3>
Introduction to HTML
</h3>
<p>
Author: Web Team
</p>
<p>
Published:
<time datetime="2026-10-01">
October 1, 2026
</time>
</p>
</header>
<p>
Learn the fundamentals of HTML.
</p>
<footer>
<p>
Category: HTML
</p>
</footer>
</article>
<article>
<header>
<h3>
HTML Forms
</h3>
<p>
Author: Web Team
</p>
</header>
<p>
Learn how to create and validate HTML forms.
</p>
<footer>
<p>
Category: HTML Forms
</p>
</footer>
</article>
</section>
</main>
The HTML <article> element represents independent
and self-contained content such as blog posts, news stories,
product reviews, tutorials, and forum posts. Articles can contain
headers, footers, headings, images, dates, and other related content.
Use <article> when the content can stand on its own,
and use <section> for meaningful thematic grouping.