<time>: The TIME Element
Last updated: 2026-10-13
<time>The TIME Element
Represents a machine-readable date or time, helping search engines and scripts parse it precisely.
| Category | Semantic |
|---|---|
| Content Model | Phrasing content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </time> tag |
| Status | Standard |
📝 Syntax
<time datetime="2026-08-23">Aug 23, 2026</time>
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
datetime | Machine-readable date/time, e.g. 2026-08-23T13:30. |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <time> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: Put a standard value in datetime (e.g. 2026-08-23 or 2026-08-23T13:30); the visible text can be anything.
❓ FAQ
QWhat is the time tag for?
A
<time> pairs a human-readable label with a machine-readable datetime attribute. For example <time datetime='2026-10-09'>today</time> — browsers, search engines, and calendar tools can all parse it precisely, which helps SEO for article publication dates.QWhat format does the datetime attribute take?
AValid formats include the date
2026-10-09, date plus time 2026-10-09T14:30, with timezone 2026-10-09T14:30+08:00, the year 2026, and durations PT2H30M — all ISO 8601. Without a datetime attribute, the tag content itself must be machine-readable.QCan time mark a duration?
AYes, using the ISO 8601 duration format:
<time datetime='PT2H30M'>two and a half hours</time> means 2 hours 30 minutes; the value starts with P (Period). Great for course lengths, video durations, and similar cases.🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.