Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

counter-increment

Definition

The counter-increment property is used to increment the count of the counters defined by the functions counter() and counters() of the content property. The screen shot below shows a heading.

Screen shot of a Web browsers shows a heading that reads 'The Period'.

The screen shot below shows text inserted via CSS before the heading using a counter.

Screen shot of a Web browsers shows a heading that reads 'Chapter 1: The Period'.

Example

  1. h2:before {
  2. content: 'Chapter ' counter(chapter) ': ';
  3. counter-increment: chapter;
  4. }

Characteristics

Possible values

identifier integer
One or more instances of a counter name followed by the value by which to increment the counter. The value of 1 will be used if a value is not specified.
none
Counter is not incremented.
inherit
Use the same computed value as the parent element for this property.

Default value

none

Applies to

All elements

Inherited

No

See also