Text Content
HTML <time> element
Represents a date, time, duration or other supported temporal value. datetime provides a machine-readable value when the visible text is not already in the required format. Use a valid machine-readable temporal value, including an offset when representing an instant that requires one. A date without a timezone is not a universal timestamp. Display the format readers expect. It accepts global HTML attributes; individual global features may be inapplicable or restricted.
Formal Syntax & Structure
html syntaxhtml
<time datetime="2026-12-01">December 1</time>Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| datetime | machine-readable date or time | Provides a machine-readable value for time, or a date/time for an insertion or deletion. Use the format appropriate to the element, not an arbitrary localized date string. |
Return Value
HTMLTimeElement
Content model: Phrasing content, with element-specific restrictions.
Working Example
Example Snippethtml
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>HTML example</title> </head> <body> <p> Meeting: <time datetime="2026-12-01">December 1</time> . </p> </body></html>