HTML | DOM Style counterIncrement Property Last Updated : 08 Aug, 2022 Comments Improve Suggest changes Like Article Like Report The Style counterIncrement property in HTML DOM specifies how much the counter should be incremented on each occurrence of a selector. The Default value for an increment is 1. Syntax: Return the counterIncrement property:object.style.counterIncrementSet the counterIncrement property:object.style.counterIncrement = "none|number|initial|inherit" Property Values: None: It is the default value. This value does not reset the counter.Number: Sets an increment for the named counter each time the element appears. This increment can be zero, or even negative. The default value is 1 if not specified.Initial: Sets the element to its initial position.Inherit: The Element inherits its property from the parent element. Example-1: Change counterIncrement Property. html <!DOCTYPE html> <html lang="en"> <head> <title> HTML | DOM Style counterIncrement Property </title> <style type="text/css"> body { counter-reset: section; } h1 { color: green; } h2 { counter-increment: section; } h2:before { content: "Section " counter(section) ". "; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>JavaScript</h2> <h2 id="h">HTML</h2> <h2>CSS </h2> <button onclick="myFunction()"> Check </button> <script> function myFunction() { document.getElementById( "h").style.counterIncrement = "subsection"; } </script> </body> </html> Output: Before: After: Example- 2: counterIncrement Property. html <!DOCTYPE html> <html lang="en"> <head> <title> HTML | DOM Style counterIncrement Property </title> <style type="text/css"> body { counter-reset: section; } h1 { color: green; } h2 { counter-increment: section; } h2:before { content: "Section " counter(section) ". "; } h3:before { counter-increment: category; content: counter(section) "." counter(category) " "; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>Javascript</h2> <h2 id="h">HTML</h2> <h2 id="H">CSS </h2> <h2>References</h2> <h3>HTML Tags</h3> <h3>CSS Properties</h3> <button onclick="myFunction()" >Check 1 </button> <button onclick="Function()"> Check 2 </button> <script> function myFunction() { document.getElementById( "h").style.counterIncrement = "subsection"; } function Function() { document.getElementById( "H").style.counterIncrement = "subsection"; } </script> </body> </html> Output: Before: After first check: After second check: Supported Browsers: The browser supported by HTML | DOM Style counter Increment Property are listed below: Google Chrome 2 and aboveEdge 12 and aboveInternet Explorer 8 and aboveFirefox 1 and aboveOpera 9.2 and aboveSafari 3 and above Comment More infoAdvertise with us Next Article HTML | DOM Style counterIncrement Property C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Style counterReset Property The Style counterReset property in HTML DOM is used to create or reset counters. This property is used with the counterincrement property and the content property.Syntax: It is used to return the counterReset property. object.style.counterResetIt is used to set the counterReset property. object.styl 1 min read HTML | DOM Style columnCount Property The DOM Style columnCount property specifies a number that defines the number of columns an element should be divided into. Syntax : To return the value: object.style.columnCount To set the value: object.style.columnCount = "number|auto|initial|inherit" Property Values: number: Specifies the number 4 min read HTML DOM Style animationIterationCount Property The Style animationIterationCount property in HTML DOM is used to set or return how many times an animation should be played. Syntax: It is used to return the animationIterationCount property.object.style.animationIterationCountIt is used to set the animationIterationCount property.object.style.anim 2 min read CSS counter-increment Property The CSS counter-increment Property is used to increment/decrement value of a counter. A CSS counter is a variable that is used to track how many times a variable is used. Syntax: counter-increment: none | identifier | initial | inherit;Default Value: none Property values:none: This is the default va 4 min read HTML DOM children Property The DOM children property is used to return an HTML collection of all the child elements of the specified element. The elements in the collection can be accessed by index numbers. It differs from childNodes as childNodes contain all nodes (i.e. it includes text and comment nodes as well) but on the 2 min read Like