Style Object
The pageBreakBefore property sets or returns the page-break behavior before an element (for printing or print preview).
Note: The pageBreakBefore property has no effect on absolutely positioned elements.
Set the pageBreakBefore property:
Return the pageBreakBefore property:
| 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) | Page break is not inserted 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 |
| inherit | The value of the pageBreakBefore property is inherited from parent element |
![]()
The pageBreakBefore property is supported in all major browsers.
Note: The value "inherit" is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports "inherit".
Always set a page break before each <p> element with id="footer":
Style Object
Your message has been sent to W3Schools.