<article>
Published May 29, 2021Updated Sep 3, 2021
Contribute to Docs
The <article>
semantic tag represents a part of a page which is self-contained and could be published elsewhere. Some common uses include blog posts or magazine articles.
Syntax
<article><!-- Article content goes inside the tag. --></article>
<article>
is a tag that wraps around a block of HTML giving it semantic meaning. It has no special attributes, and by default will act similarly to a <div>
.
Example
Suppose that there is a need to layout multiple posts about coding practices for a new site. It would be semantically correct to use the <article>
tag, as below:
<h1>FizzBuzz Feed</h1><article><h2>How I Learned to Love Conditionals</h2><p>First paragraph of first article.</p><p>Second paragraph of first article.</p></article><article><h2>Nineteen New Uses for HTML Canvas</h2><p>First paragraph of second article.</p><p>Second paragraph of second article.</p></article>
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn HTML on Codecademy
- Career path
Front-End Engineer
Front-end engineers work closely with designers to make websites beautiful, functional, and fast.Includes 34 CoursesWith Professional CertificationBeginner Friendly115 hours - Free course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner Friendly7 hours