Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<time>

A date or time readable by both people and programs.

Syntax

<time datetime="2026-05-01">May 1</time>

Attributes

ParameterTypeDescription
datetimedate / timeThe date or time in machine format: `2026-05-01`, `19:30`, `2026-05-01T19:30`.

Examples

A publication date and an event time:

<p>Published <time datetime="2026-05-01">May 1, 2026</time></p>
<p>The tasting starts at <time datetime="19:30">7:30 pm</time>.</p>

Notes

The text inside can be written any way you like, while datetime holds the exact value — read by search engines, calendars and scripts. <time> looks like plain text.

See also

  • <article> — A self-contained piece that makes sense on its own: an article, a post, a review, a product card.
  • <del>, <s> — Struck-through text: `<del>` for content removed from the document, `<s>` for outdated content; `<ins>` for added content.
  • <data> — Links visible text to a machine-readable value — a product code, an exact number — for scripts and search engines.

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.