<time>
Indicating a date, time, or duration readable by machines
<time> — Date and time
The <time> element represents a date, time, or duration. The datetime attribute provides the value in ISO 8601 format, readable by machines.
When to use it
You want to indicate a publication date, an event time, a deadline, or a duration. The visible text can be in natural language; the datetime attribute supplies the machine version.
What you gain
Accessibility: screen readers read the visible text, not the datetime. The benefit is for machines: the datetime removes ambiguity from "04/05/2026" (April or May?) without changing what the user sees.
SEO: Google does not use the datetime attribute of <time>. For rich results, you need Schema.org datePublished and dateModified properties in JSON-LD (Google documentation).
Code example
<p>Published on <time datetime="2026-04-24">April 24, 2026</time>.</p>
<p>The meeting starts at <time datetime="14:30">2:30 PM</time>.</p>
<p>Cooking time: <time datetime="PT1H30M">1 hour 30 minutes</time>.</p>Further reading
<ins>— inserted text (also usesdatetime)<del>— deleted text (also usesdatetime)- WHATWG —
<time> - W3C — ISO 8601
- MDN —
<time>