HTML | DOM Style animationPlayState Property Last Updated : 10 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The HTML DOM Style animationPlayState Property is used to specify whether an animation is running or paused. Syntax : animation-play-state: running|paused|initial|inherit; Return Values: It returns a string that represents the animation-play-state property of an element Property Values: running: This value is used to run/play an animation.paused: This value is used to pause an animation.initial: This value sets the animation-play-state property to the value of the parent element.inherit: This value is used to set the .animation-play-state property to default(running). Example: animation-play-state: running HTML <!DOCTYPE html> <html> <head> <title> HTML | DOM Style animationPlayState Property </title> <style> div { height: 100px; width: 150px; font-size: 100px; -webkit-animation: movement 3s infinite; -webkit-animation-play-state: paused; animation: movement 3s infinite; color: darkgreen; position: relative; < !-- property value "running" --> animation-play-state: running; } @-webkit-keyframes movement { from { left: 50px; } to { left: 400px; } } @keyframes movement { from { left: 50px; } to { left: 400px; } } </style> </head> <body> <br> <div id="block">Geeks For Geeks</div> </body> </html> Output: Example: animation-play-state: paused HTML <!DOCTYPE html> <html> <head> <title> HTML | DOM Style animationPlayState Property </title> <style> div { height: 100px; width: 150px; font-size: 100px; -webkit-animation: movement 3s infinite; -webkit-animation-play-state: paused; animation: movement 3s infinite; color: darkgreen; position: relative; < !-- property value "paused" --> animation-play-state: paused; } @-webkit-keyframes movement { from { left: 50px; } to { left: 400px; } } @keyframes movement { from { left: 50px; } to { left: 400px; } } </style> </head> <body> <button onclick="Play()"> Click to make the object move </button> <script> function Play() { document.getElementById("block" ).style.WebkitAnimationPlayState = "running"; document.getElementById("block" ).style.animationPlayState = "running"; } </script> <br> <div id="block">Geeks For Geeks</div> </body> </html> Output : Example: animation-play-state: inherit HTML <!DOCTYPE html> <html> <head> <title> HTML | DOM Style animationPlayState Property </title> <style> div { height: 50px; width: 150px; font-size: 100px; -webkit-animation: movement 3s infinite; -webkit-animation-play-state: paused; animation: movement 3s infinite; color: darkgreen; position: relative; animation-play-state: running; } h4 { width: 150px; -webkit-animation: movement 3s infinite; -webkit-animation-play-state: paused; animation: movement 3s infinite; color: darkgreen; position: relative; <!-- property value "inherit" --> animation-play-state: inherit; } @-webkit-keyframes movement { from { left: 50px; } to { left: 400px; } } @keyframes movement { from { left: 50px; } to { left: 400px; } } </style> </head> <body> <br> <div id="block"> Gfg <h4> I'm inherited</h4> </div> </body> </html> Output: Example: animation-play-state: initial HTML <!DOCTYPE html> <html> <head> <title> HTML | DOM Style animationPlayState Property </title> <style> div { height: 100px; width: 150px; font-size: 100px; -webkit-animation: movement 3s infinite; -webkit-animation-play-state: paused; animation: movement 3s infinite; color: darkgreen; position: relative; < !-- property value "initial" --> animation-play-state: initial; } @-webkit-keyframes movement { from { left: 50px; } to { left: 400px; } } @keyframes movement { from { left: 50px; } to { left: 400px; } } </style> </head> <body> <br> <div id="block">Geeks For Geeks</div> </body> </html> Output: Supported Browsers: The browser supported by animation-play-state property are listed below: Chrome: 43.0 and aboveFirefox: 16.0 and aboveSafari: 9.0 and aboveInternet Explorer: 10 and aboveEdge: 12.0 and aboveOpera: 30.0 and above Comment More infoAdvertise with us R roshalmoraes Follow Improve Article Tags : JavaScript Similar Reads HTML | DOM IFrame Object The IFrame Object property in HTML DOM is used to create and access the <iframe> element within the object. An inline frame is used for embedding another document within the current HTML document. Syntax:It is used to access a <iframe> element.var x = document.getElementById("myframe");I 3 min read HTML | DOM Input Color Object The Input Color Object property in HTML DOM is used to create and access the <input> element within the object. The <input> is used to enter data in the input field. Declaration of input control that allow user to input data is can be done by <input> elements are used within a < 3 min read HTML | DOM TableData Object The TableData object in HTML DOM is used to represent the HTML td element. The td element can be accessed by using getElementById() method. Syntax: To Access td Element: document.getElementById("id");To Create td Element: document.createElement("td"); TableData Object Properties: PropertyDescription 3 min read HTML | DOM Input Number Object The Input Number Object in HTML DOM is used to represent an HTML input element with type= "number". The input element with type= "number" can be accessed by using getElementById() method. Syntax: It is used to access input number object.document.getElementById("id");It is used to create input elemen 3 min read HTML | DOM Style overflowY Property The Style overflowY property in HTML DOM is used to specify the behavior of the content when it overflows an element's top and bottom edges. The content may be hidden, shown or a scrollbar according to the value. Syntax: It returns the overflowY property.object.style.overflowYIt is used to set the o 6 min read HTML | DOM Object Object The Object object represents only HTML <object> element. We can access any <object> element by using the getElementById(); and also can create object element by using createElement(); method.Syntax: It is used to access Object element document.getElementById("id"); It is used to create o 2 min read HTML DOM Window localStorage Properties HTML DOM Window localStorage Properties allow you to store value pairs in web browsers using objects. It is a read-only property. This object is not expired even if the browser is closed. So, the data is never lost. Return Values: It returns  a Storage object. Syntax: SAVING data to localStorage usi 2 min read HTML DOM Style transform Property The HTML DOM style transform property is used to transform the object. The transform property allows to rotate, scale, move, skew, etc of an element. It can use 2D or 3D transformation. SyntaxIt returns the transform property.object.style.transformIt sets the transform property.object.style.transfor 3 min read HTML DOM Textarea cols Property The DOM Textarea cols Property is used to set or return the value of the cols attribute of a textarea field. The cols attribute how many average-width characters should fit on a single line. Syntax: It is used to return the cols property.textareaObject.colsIt is used to Set the cols property:textare 2 min read HTML | DOM Style transformStyle Property The transformStyle property is used to set or return, the different ways nested elements use for their rendering in 3D space.Syntax: It return transformStyle: object.style.transformStyleIt set transformStyle: object.style.transformStyle = "flat|preserve-3d|initial|inherit" Properties: flat: It is th 4 min read Like