HTML Attributes

HTML datetime attribute

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. Applicable elements include: <del>, <ins>, <time>. Check each element’s value rules.

Formal Syntax & Structure

html syntaxhtml
datetime="2027-01-15"

Parameters & Attributes

NameTypeDescription
datetimemachine-readable date or timeProvides 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.

Working Example

Example Snippethtml
<time datetime="2027-01-15">15 January 2027</time>
HTML Reference