The page-break-before
property adds a page-break before the element that is specified.
This property cannot be used on an empty <div>
or absolutely positioned elements. page-break-before
, page-break-after
, and page-break-inside
are all used to designate how a document will print.
@media print {
h2 { page-break-before: always; }
}
auto
Default value. Page breaks are automatic.
always
Always insert a page-break before the specified element.
avoid
If possible, avoid page-break before the specified element.
left
Insert a page-break before the specified element so the next element is formatted as a left page.
right
Insert a page-break before the specified element so the next element is formatted as a right page.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of page-break-before
? Submit a codepen.io demo and we'll showcase it here ↴