The HTML <time> tag is used for declaring the date and/or time within an HTML document.
The <time> tag was introduced in HTML 5.
In the pane below, you will find three examples.
<time> tag.datetime attribute in order to provide the contents in a machine-readable format.datetime attribute to provide an even more specific date and time than the previous example.
<p>On Saturdays, we open at <time>09:00</time>.</p>
<p>The concert is <time datetime="2009-02-18">next Wednesday</time>.</p>
<p>We finally hit the road at <time datetime="2009-02-17T05:00-07:00">5am last Tuesday</time>.</p>
The following table shows the attributes that are specific to this tag/element.
| Attribute | Description |
|---|---|
| datetime | Specifies the date or time being specified. Must be a representation of the element's contents in a machine-readable format. Must be a valid date or time string. |