HTML <time> Tag


The HTML <time> tag is used to semantically represent a specific time or date within the content of a web page. It helps browsers and search engines understand the temporal context of the information it encloses. This tag is particularly useful for marking up events, publication dates, and other time-related data on a webpage. It can include various attributes like datetime to provide a machine-readable date or time for better accessibility and SEO. The <time> tag enhances the structure and meaning of web content, improving both user experience and the ability of search engines to index and display relevant results.


Permitted Parents
Any element that accepts phrasing content
Inline and text, but no descendant <time> elements
Start/End Tags
Start tag: required, End tag: required


<p>Our business hours are <time>8:30</time> until <time>4:30</time></p>
<p>My holidays start on <time datetime="2018-12-25 00:00">Christmas day</time>.</p>


Attribute Definition
datetime Gives the date/time being specified. Otherwise, the date/time is given by the element's contents

Global Attributes

The <time> tag also supports the Global Attributes in HTML5

Event Attributes

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

Browser Support

The following table will show you the current browser support for the HTML <time> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th March 2024