HTML | DOM Time Object Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The DOM Time Object is used to represent the HTML Time element . The Time element is accessed by getElementById().Properties: dateTime: It contains single attribute datetime which is used to set or return the date/time in a machine-readable form of the element. Syntax: document.getElementById("ID"); Where “id” is the ID assigned to the “time” tag.Example-1: html <!DOCTYPE html> <html> <head> <title>DOM Time Object</title> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Time Object</h2> Jawahar lal Nehru birthday is celebrated on <!-- Assigning id to time tag. --> <time Id="GFG" datetime="2018--11-14 12:00"> children's day. </time> <br> <br> <button onclick="myGeeks()">Submit</button> <p id="sudo"></p> <script> function myGeeks() { var g = document.getElementById("GFG").innerHTML; document.getElementById("sudo").innerHTML = g; } </script> </body> </html> Output:Before Clicking On Button: After Clicking On Button: Example-2: <Time> Object can be created by using the document.createElement method. html <!DOCTYPE html> <html> <head> <title>DOM Time Object</title> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Time Object</h2> <br> <button onclick="myGeeks()">Submit</button> <script> function myGeeks() { // time tag created var g = document.createElement("TIME"); g.setAttribute( "datetime", "2018--11-14 12:00"); var f = document.createTextNode("Children's day"); g.appendChild(f); document.body.appendChild(g); } </script> </body> </html> Output :Before Clicking On Button: After Clicking On Button : Supported Browsers: The browser supported by DOM Time Object are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us Next Article HTML | DOM AnimationEvent M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML | DOM Style backgroundSize Property The HTML DOM Style backgroundSize Property is used to set or return the size of the background image. Syntax: To get the backgroundSize propertyobject.style.backgroundSizeTo set the backgroundSize propertyobject.style.backgroundSize = "auto | length | percentage | cover| contain |initial | inherit" 6 min read HTML | DOM Style font Property The HTML DOM Style's font property is used to change the element's font properties. It can be used to change the font style, weight, size, and family. Syntax: To set the font style :node.style.font = "font-properties font-size font-family;"To get the current font style:node.style.font; Return Values 2 min read HTML | DOM Style lineHeight Property The Style lineHeight property is used for setting or returning the distance between lines in a text. It is a string which represents the distance between lines in the text. To return the line-height.object.style.lineHeightTo set the line-height.object.style.lineHeight = "normal|number|length|%|initi 2 min read HTML DOM Style maxWidth Property The maxWidth property of HTML DOM sets/returns the maximum width of an element. The maxWidth property affects only block-level elements, absolute or fixed position elements. Syntax: It returns the maxWidth property.object.style.maxWidthIt sets the maxWidth Property.object.style.maxWidth = "none | le 2 min read HTML | DOM AnimationEvent In the HTML document, AnimationEvent interface is used to represent events providing information related to animations. AnimationEvent contains properties such as animationName, elapsedTime and pseudoElement. animationName: The animationName property returns the name of the event animation. It retur 2 min read HTML | DOM Style animationFillMode Property The DOM style animationFillMode property is used to specify the style of an element when the animation is not playing or when an animation is finished or when there is a delay in animation. The animationFillMode property can override the default behavior of CSS animations by which CSS animations aff 3 min read HTML DOM ownerDocument Property The ownerDocument property returns the top-level document object of the node. Here, the owner document of the node is returned as the document object. It is a read-only property. Syntax: node.ownerDocument; Properties: nodeName property: It returns the name of the specified node. If the node is an e 2 min read HTML | DOM Style transitionDelay Property The transitionDelay property in HTML DOM is used to specify the time in seconds or milliseconds when execution of transition starts. The delay refers to the time, which to be waited before starting the transition effect. Syntax: It returns the transitionDelay property.object.style.transitionDelayIt 3 min read HTML DOM Style textDecorationStyle Property The Style textDecorationStyle property in HTML DOM is used to set the decoration of text with different kinds of lines. It can display the line in various styles like a single line, double line, wavy, etc. By using this property, we can display the line in a specified style. Syntax:Â Â It returns the 2 min read HTML | DOM Style listStyle Property The Style listStyle Property in HTML DOM used to set up to three list properties namely list-style-typelist-style-positionlist-style-image Syntax: It returns the listStyle property.object.style.listStyleIt used to set the listStyle property.object.style.listStyle = "type position image|initial|inher 2 min read Like