• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Classification Properties an... > counter-increment and counter-reset ...

15.8. counter-increment and counter-reset Properties

The counter-increment and counter-reset properties are both used to increase the range of automatic numbering options available within browsers. Using these properties, you can now automatically set such things as chapter headings with sub-sections. The counter-increment property is used to establish which Web tag begins a sequence and when a value of “1” should be added to subsequent instances of that tag within the page. The counter-reset property determines which element should reset the counting for properties on the Web page (i.e., turn the increment value back to “0”).

Both the counter-increment and counter-reset properties take the same values: a text string that sets the identifier for the element to be incremented, as well as the value by which it should be incremented, plus the named values none (which tells the browser not to increment) and inherit (which takes on any parent value for these properties). The string set for the counter-increment and counter-reset properties works similarly for both properties. The text string works as an “identifier” to be associated with the property. These values are then defined. The following code snippet should make things clear:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint