HTML5 <time> Tag

Example

How to define a time and a date:

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

<p>
Finished my Higher Studies <time datetime="2014-04-21">A Good Day</time>
</p>

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.

Attributes

Attribute Value Description
datetime 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
pubdate 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.


Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!