Javascript Reference - HTML DOM Style pageBreakBefore Property








The pageBreakBefore property sets or gets the page-break behavior before an element for printing or print preview.

Browser Support

pageBreakBefore Yes Yes Yes Yes Yes

Syntax

Return the pageBreakBefore property:

object.style.pageBreakBefore 

Set the pageBreakBefore property:

object.style.pageBreakBefore='auto|always|avoid|emptystring|left|right|initial|inherit'

Property Values

Value Description
auto Insert a page break before the element if necessary. This is default
always Always insert a page break before the element
avoid Avoid a page break before the element
'' (empty string) Don't insert page break before the element
left Insert one or two page breaks before the element, so the next page is considered a left page
right Insert one or two page breaks before the element, so the next page is considered a right page
initial Set to default value
inherit Inherit from parent element.




Technical Details

Default Value: auto
Return Value: A string representing the page-break behavior before an element
CSS Version CSS2