<article>

Defines independent content in an HTML page.
2 min read
Believemy logo

The <article> tag is used to define independent, autonomous, and complete content within an HTML page.

More generally, any content that can be distributed or reused elsewhere, such as in RSS feeds, blog posts, publications, or documentation sections.

Generally, the <article> tag is used to specify elements that are related to a specific article, such as:

  • A title;
  • A description;
  • A publication date;
  • Etc.

 

Structure and Syntax of the <article> Tag

As we have seen, the <article> tag can contain various HTML elements such as titles, paragraphs, images, or lists. It represents a distinct content element.

Syntax

HTML
<article>
  <!-- Autonomous content -->
</article>

 

Usage Example

HTML
<article>
  <h2>Title of My Article</h2>
  <p>Description</p>
</article>

In this example, we have grouped all elements that are part of the same article within an <article> tag.

This helps search engines to more easily understand the different articles we might present on a page.

 

Attributes

The <article> tag does not have specific attributes. However, it can accept all "classic" HTML attributes:

AttributeDescriptionPossible Value
idUnique identifier for targeting the element.Unique text.
classCSS class(es) for styling the article.List of classes separated by spaces.
styleInline CSS style.CSS declarations.
langLanguage used in the article.Language code (fr, en, etc.).
data-*Custom data attributes for specific needs.Text or any value.
hiddenIndicates that the article should be hidden (not visible to the user).None or hidden.
titleTooltip displayed when hovering over the article.Descriptive text.

 

Browser Compatibility

The <article> tag is widely supported by modern browsers.

ElementGoogle ChromeSafariMozilla FirefoxEdge
<article>YesYesYesYes

Related terms

Discover our hTML and CSS glossary

Browse the terms and definitions most commonly used in HTML and CSS development.

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.