Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<article>

A self-contained piece that makes sense on its own: an article, a post, a review, a product card.

Syntax

<article>…</article>

Examples

Two blog posts:

<article>
  <h2>How we roast beans</h2>
  <p>Every Monday we roast a fresh batch…</p>
</article>
<article>
  <h2>Meet our new barista</h2>
  <p>Anna joined the team in May…</p>
</article>

Notes

A quick test: if the piece could be shared or published separately and still make sense, it is an <article>. If it is just a part of a bigger text, it is a <section>.

See also

  • <section> — A thematic section of the page with its own heading.
  • <header> — The header of a page or a section: logo, heading, navigation.
  • <time> — A date or time readable by both people and programs.

Related recipes

In the tutorial

  • Semantic markup — The neutral div and span and the meaningful header, nav, main, article, section, aside and footer tags for page structure.

Thanks for reading!

Donate to the site — we work hard for you.