page-policy property CSS Reference

Definition and Usage

'page-policy' determines which page-based occurance of a given element is applied to a counter or string value

Name: page-policy
Value: start | first | last
Initial: start
Applies to: @counter and @string blocks
Inherited: N/A
Percentages: N/A
Media: paged
Computed value: specified value


page-policy: start | first | last;


Takes the value of the counter or string at the beginning of the page (before applying style to the elements of the page, but after applying it to the @page context itself).
Takes the value after the first state change in the counter or string during processing of the page.
Takes the value following the final state change on the page.


/* This example places the chapter name in the header, specifying that it is the value of the string at the end of the page:  */
@string chapter { page-policy: last; }
@page {
  size: 21.0cm 29.7cm; /* A4 */
  @top {
    text-align: right;
    vertical-align: center;
    content: string (chapter);

Relative articles