HTML <time> Tag
Example
How to define a time and a date:
<p>Open from
<time>10:00</time> to <time>21:00</time> every weekday.</p>
<p>I have a date on
<time datetime="2008-02-14 20:00">Valentines day</time>.</p>
Try it Yourself »
Definition and Usage
The <time>
tag defines a specific time
(or datetime).
The datetime
attribute of this element is used
translate the time into a
machine-readable format so that browsers can offer to add date reminders through
the user's calendar, and search engines can
produce smarter search results.
Browser Support
The numbers in the table specify the first browser version that fully supports the element.
Element | |||||
---|---|---|---|---|---|
<time> | 62.0 | 18.0 | 22.0 | 7.0 | 49.0 |
Attributes
Attribute | Value | Description |
---|---|---|
datetime | datetime | Represent a machine-readable format of the <time> element |
Global Attributes
The <time>
tag also supports the Global Attributes in HTML.
Event Attributes
The <time>
tag also supports the Event Attributes in HTML.
Related Pages
HTML DOM reference: Time Object
Default CSS Settings
None.
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.