View video tutorial

HTML <time> Tag


The <time> tag defines a specific time.

HTML <time> Tag

The <time> element represents a specific time period.

It can include datetime attribute to translate dates and times into machine-readable formats.

In most browsers the <time> element does not show anything special in rendering..

Element Attributes

Attribute Value Description
datetime datetime It represents a machine-readable format of the <time> element.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<p>The event was held on <time datetime="2018-06-06"> June 6</time> in Hyde Park, London. The event started at
    <time datetime="20:00"> 20:00 </time> and lasted about <time datetime="PT2H30M">2 hours 30 minutes</time>.</p>
Try it Now »

Click on the "Try it Now" button to see how it works.