Easy Tutorial
❮ Prop Textarea Cols Dom Obj Canvas ❯

HTML DOM Time Object


Time Object

The Time object represents an HTML <time> element.

Accessing a Time Object

You can use getElementById() to access a <time> element:

Creating a Time Object

You can use the document.createElement() method to create a <time> element:

Time Object Properties

Property Description
dateTime Sets or returns the value of the datetime attribute in a <time> element.

Standard Properties and Events

The Time object also supports standard properties and events.


Related Articles

HTML Reference: HTML <time> Tag

❮ Prop Textarea Cols Dom Obj Canvas ❯