HTML5 <time> Tag


How to define a time and a date:

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

I have a date on <time datetime="2008-02-14">Valentines day</time>

Try it yourself »

Definition and Usage

The <time> tag defines a time or a date, or both.

Differences Between HTML 4.01 and HTML5

The <time> tag is new in HTML5.


New : New in HTML5.

Attribute Value Description
datetimeNew datetime Defines the date or time of the element. If this attribute is not defined, the element's date or time must be defined inside the element
pubdateNew pubdate Specifies that date and time in the time element is the publication date and time of of the document, or the nearest ancestor article element

Standard Attributes

The <time> tag also supports the Standard Attributes in HTML5.

Event Attributes

The <time> tag also supports the Event Attributes in HTML5.