HTML Tag Reference - HTML tag <time>

You use the time element to represent a time of day or a date. The datetime attribute specifies the date or time in a format specified by RFC3339(

Browser compatibility

<time> Yes Yes Yes Yes Yes

What's new in HTML5

The <time> tag is new in HTML5.


Attribute Value Description
datetime datetime Represent a machine-readable date/time

Global Attributes

The <time> tag supports the Global Attributes in HTML.

Event Attributes

The <time> tag supports the Event Attributes in HTML.

Default CSS Settings



   <time datetime="15:00">3 o'clock</time> on 
   <time datetime="2011-12-7">December 7th</time>. 
</body> <!--from ww w  . ja  v  a 2s  . co m-->

Click to view the demo