The "counter-increment" property in CSS
The counter-increment CSS property is used to increment one or more CSS counters. CSS counters are variables maintained by CSS whose values can be incremented or decremented. We can use incremented counters to generate content using the content property or display their values using the counter() or counters() function. This property is especially useful for automatically numbering items in lists or sections of content. Example to demonstrate the use of "counter-increment" CSS property <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Counter Increment Example</title> <style> /* Define a counter named 'list-counter' */ body { counter-reset: list-counter; } /* Increment the 'list-counter' for each <li> element */ li { counter-increment: list-counter; } /* Style ...