Valentine's Day.

``` ---"> Valentine's Day.

``` ---" />
Easy Tutorial
❮ Canvas Clip Att Input Form ❯

HTML <time> Tag

Example

How to define time and date:

<p>We open at <time>9:00</time> every morning.</p>

<p>I have a date on <time datetime="2016-02-14">Valentine's Day</time>.</p>

Browser Support

The numbers in the table specify the first browser version that supports the attribute.

Element
<time> 6.0 9.0 4.0 5.0 11.1

Tag Definition and Usage

The <time> tag defines a specific time (or datetime) in the Gregorian calendar, in 24-hour format. Timezone offsets are optional.

This element can encode dates and times in a machine-readable way, allowing user agents, for example, to add birthday reminders or scheduled events to the user's calendar, and search engines to produce smarter search results.


Differences Between HTML 4.01 and HTML5

The <time> tag is new in HTML5.


Attributes

Attribute Value Description
datetime New datetime Specifies the date/time. Alternatively, the date/time can be specified by the element's content.
pubdate datetime (This attribute is still being designed and discussed by WHATWG and W3C.) Indicates that the date/time in the <time> element is the publication date of the document (or the nearest ancestor <article> element)

Global Attributes

The <time> tag supports HTML's global attributes.


Event Attributes

The <time> tag supports HTML's event attributes.

❮ Canvas Clip Att Input Form ❯