HTML <time> Tag
Definition und Verwendung
<time>
Das Tag definiert eine spezifische Zeit (oder Datums- und Zeitangabe).
Die datetime-Attribute dieses Elements wird verwendet, um Zeit in maschinenlesbaren Format zu konvertieren, damit der Browser dem Benutzer Erinnerungen an Termine über das Kalender offerieren kann und Suchmaschinen intelligentere Suchergebnisse generieren können.
Weitere Informationen:
HTML-DOM-Referenzhandbuch:Time-Objekt
Example
How to define time and date:
<p>Business Hours: Every working day from <time>10:00</time> to <time>21:00</time>.</p> <p>I have a date on <time datetime="2024-02-14 18:00">Valentine's Day</time>.</p>
Attribute
Attribute | Value | Description |
---|---|---|
datetime | Date and Time | Represents the machine-readable format of the <time> element. |
Global Attributes
<time>
The tag also supports Global Attributes in HTML.
Event Attributes
<time>
The tag also supports Event Attributes in HTML.
Default CSS Settings
None.
Browser Support
The numbers in the table indicate the first browser version to fully support this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
62.0 | 18.0 | 22.0 | 7.0 | 49.0 |