HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Time object represents an HTML <time> element
The Time object represents an HTML <time> element.
Access a Time Object
You can access a <time> element by using getElementById():
var x = document.getElementById("myTime");
Create a Time Object
You can create a <time> element by using the document.createElement() method:
var x = document.createElement("TIME");
Property | Description |
---|---|
dateTime | Sets or returns the value of the datetime attribute in a <time> element |
The Time object also supports the standard properties and events.
HTML reference: HTML <time> tag