HTML <time> tag

Updated: 11/13/2018 by Computer Hope
HTML time tag

When writing in HTML, the <time> tag is an inline element used to designate a date and time that are readable by human beings. It may also be used to present dates and times in a machine readable format; which enables event scheduling for a user's calendar. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Example of <time> code

<p>The dentist's office opens at <time>8:00</time>.</p>

<p>Your appointment is at <time datetime="2015-05-14 9:00">
	9:00 on May 14th</time>.</p>

Example result

The dentist's office opens at .

Your appointment is at .


Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows the only current, unique, HTML attribute for the <time> tag, as well as a description.

Attribute Description
datetime Used to designate a machine-readable date and time in a time element.


Edge Internet Explorer Firefox Safari Opera Chrome
All versions Not supported 22.0+ 7.0+ 49.0+ 62.0+

Browser, Compatibility, URL, Web design terms