Javascript Reference - HTML DOM Style pageBreakAfter Property








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

Browser Support

pageBreakAfter Yes Yes Yes Yes Yes

Syntax

Return the pageBreakAfter property:

var v = object.style.pageBreakAfter 

Set the pageBreakAfter property:

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

Property Values

Value Description
auto Insert a page break after the element if necessary. This is the default value.
always Always insert a page break after the element
avoid Avoid a page break after the element
'' (empty string) Do not add Page break after the element
left Insert one or two page breaks after the element, so the next page is considered a left page
right Insert one or two page breaks after 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 after an element when printing
CSS Version CSS2