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
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.