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 »
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.
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 |
Attribute | Value | Description |
---|---|---|
datetime | datetime | Represent a machine-readable format of the <time> element |
The <time>
tag also supports the Global Attributes in HTML.
The <time>
tag also supports the Event Attributes in HTML.
HTML DOM reference: Time Object
None.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!