Easy Tutorial
❮ Prop Submit Type Met Namednodemap Getnameditem ❯

pageBreakBefore Property


Definition and Usage

The pageBreakBefore property sets or returns the page-break behavior before an element (used for printing or print preview).

Note: The pageBreakBefore property does not affect absolutely positioned elements.

Syntax

Setting the pageBreakBefore property:

Returning the pageBreakBefore property:

Value Description
auto Default. Inserts a page break before the element if necessary.
always Always inserts a page break before the element.
avoid Avoids inserting a page break before the element.
"" (empty string) Does not insert a page break before the element.
left Inserts one or two page breaks before the element, until a blank left page is reached.
right Inserts one or two page breaks before the element, until a blank right page is reached.
inherit The value of the pageBreakBefore property is inherited from the parent element.

Browser Support

All major browsers support the pageBreakBefore property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if !DOCTYPE is specified. IE9 supports "inherit".


Example

Always set a page break before every <p> element with id="footer":


❮ Prop Submit Type Met Namednodemap Getnameditem ❯