Paged media (e.g., paper, transparencies, pages that are
displayed on computer screens, etc.) differ from
continuous media
in that the content of the document is split into one or more discrete
pages.

CSS 2.1 has three properties that indicate where the user agent may
or should break pages, and on what page (left or right) the subsequent
content should resume. Each page break ends layout in the current page
and causes remaining pieces of the document tree to be laid out on a new
page.

Force one or two page breaks before
(after) the generated box
so that the next page is formatted as a left page.

right

Force one or two page breaks before (after) the generated
box so that the next page is formatted as a right page.

Whether the first page of a document is a left page or a right page
is not defined in this specification. A conforming user agent may
interpret the values 'left' and 'right' as 'always'.

A potential page break location is typically under the influence
of the parent element's 'page-break-inside'
property, the 'page-break-after' property
of the preceding element, and the 'page-break-before' property
of the following element. When these properties have values other
than 'auto', the values 'always', 'left', and 'right' take precedence
over 'avoid'.

These properties only apply to non-floating block-level elements.
Also, page breaks cannot be forced to occur inside table cells, absolutely positioned
boxes, and fixed
positioned boxes. Page breaks set before, inside, or after such
elements must be ignored.

Rule A: Breaking at (1) is allowed only if the 'page-break-after' and 'page-break-before' properties of all
the elements generating boxes that
meet at this margin allow it, which is when at least
one of them has the value 'always', 'left', or 'right', or when all of them are
'auto'.

Rule B: However, if all of them are 'auto' and
the nearest common ancestor of all the elements has a 'page-break-inside' value of
'avoid', then breaking here is not allowed.

If the above rules do not provide enough break points to keep content
from overflowing the page boxes, then rules B and C are dropped in
order to find additional breakpoints. If that still does not lead to
sufficient break points, rule A is dropped as well.

A page break must occur at (1) if, among the 'page-break-after' and 'page-break-before'
properties of all the elements generating boxes that meet at this
margin, there is at least one with the value 'always', 'left', or
'right'.

CSS 2.1 does not define which of a set of allowed page breaks
must be used; CSS 2.1 does not forbid a user agent from breaking at every
possible break point, or not to break at all. But CSS 2.1 does recommend
that user agents observe the following heuristics (while recognizing
that they are sometimes contradictory):

Break as few times as possible.

Make all pages that don't end with a forced break appear to have about
the same height.