A timestamp is prose for people and a fact for machines, and a bare string is only the first of those. The time element carries both, which makes it an gacor piece of markup economy.
<time datetime="2026-10-20T10:35+08:00">Oct 20, 2026</time>What the attribute carries
- datetime accepts calendar dates, local datetimes with an offset, and durations; the visible text stays human and can say anything at all.
- Durations use the same syntax, so a recipe or a recording length can be marked as PT2H30M while the page shows 2h 30m.
- Dates without a year, such as a birthday, use the two-leading-dashes form the spec defines for exactly that case.
Who actually reads it
Sorting widgets, archive filters, and agents that summarize a page all prefer a parsed value over scraping prose, and structured-data consumers benefit when the value feeds a schema block. None of that needs JavaScript, which is rather the point: the data model ships as markup.
Write the visible text for the reader and the attribute for the machine, and never let one lie on behalf of the other. For five minutes of work the payoff is gacor: every timestamp on a site becomes a sortable, quotable fact.
