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.
Always set a page break before each <p> element with id="footer":
Style Object
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| XML Editor - Free Trial! |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|