HTML
The tags are used to represent the date and time that appear in HTML pages, in order to make it easier for other programs, such as search engines, to extract this information.How to define a time and date:
<p>I have a date on<time datetime="2017-02-14">Valentines day</time>.</p>
Try it out . . .
Browser support
The numbers in the table support the version number of the first browser for this property.
Elements | |||||
---|---|---|---|---|---|
<time> | 6.0 | 9.0 | 4.0 | 5.0 | 11.1 |
Label definition and instructions for use
The label defines the time (24-hour system) or date of the Gregorian calendar, and the time and time zone offsets are optional.
This element encodes dates and times in a machine-readable manner so, for example, that a user agent can add birthday reminders or scheduled events to a user's calendar, and search engines can generate smarter search results.
Tip: The label does not present any special effects in any browser, but is only used to identify the machine.
The difference between HTML 4.01 and HTML5
The label is the new label in HTML5.
Property
New : The new property in HTML5.
Attributes | value | describe |
---|---|---|
datetime New | datetime | Specify the date / time.Alternatively, it is a given date / time from the content of the element. |
Global properties
Labels support the global properties of HTML.
The event property
The tag supports the event properties of HTML.