HomeReferencesCSS Properties

CSS Property: counter-reset

Resets a named counter. Only supported by Opera at the time of writing.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Possible Values

  • inhert
  • none (default)
  • [name] [number] - the name of the counter optionally followed by the number that the counter resets to (default is 0). This can be a chain of names and numbers such as chapter 2 section 1 subsection which will reset chapter to 2, section to 1 and subsection to 0.

Example


h2:before {
	content: counter(chapter);
	counter-increment: chapter;
	counter-reset: section;
}