DEV Community

Cover image for HTML tags | article
Carlos Espada
Carlos Espada

Posted on • Edited on

HTML tags | article

It is used to define an independent and self-contained element within a document. In other words, it should make sense on its own and can be distributed or reused independently of the rest of the site.

Examples of <article> can be a news item from a newspaper, a blog post, a forum post, a product card, a comment sent by a user, an interactive widget...

Typically, although not required, it usually has a header (<h1>-<h6>) that identifies each <article> in the document.

They can be nested, such as each comment on a blog post would be an <article> related to a superior <article>, which would be the post.

To indicate the author of an <article> you can use <address> (although the <article> nested inside it would not inherit it) and to indicate the publication date we would use the <time> with its datetime attribute.

Has an implicit ARIA role article.

  • Type: block
  • Self-closing: No
  • Semantic value: Yes

Definition and example | Support

Top comments (0)