Home CSS Properties page-break-before CSS page-break-before Property Definition
Definition and Usage The page-break-before property adjusts page breaks before the current element in print and other paged media. It applies to block-level elements that generate a box.
It is not inherited. The initial value is auto. Pair it with page-break-after and page-break-inside for older print stylesheets.
Deprecated Prefer break-beforepage-break-before is a legacy alias. Use break-before in new CSS. Note: always maps to break-before: page.
Syntax
CSS Syntax page-break-before: auto | always | avoid | left | right | initial | inherit ;
Some engines also recognize recto and verso. Start with auto, always, and avoid.
Values
Property Values Value Description Try it autoDefault. Neither forces nor forbids a break Try italwaysAlways force a page break before the element Try itavoidAvoid a page break right before the element Try itleft / rightForce a break so this element starts on a left or right page Try itinitialResets to auto Try itinheritTakes the parent’s page-break-before Try it
Approach
How to Use page-break-before Use it only for print styles you maintain, or migrate the rule to break-before.
Pick the block that should start a printed page (often a chapter heading). Set page-break-before: always so that block begins on a new page. Check the result in Print Preview (Ctrl+P / Cmd+P). For new CSS, rewrite as break-before: page . Piece Required? Role Block-level element Yes Must generate a box Paged media Yes (to see it) Print Preview or printed output Keyword Yes always, avoid, auto, and othersModern replacement Recommended break-before: page instead of always
Try it
Live Preview Screen layout cannot show real print pages. This demo simulates a forced break before the marked block when you choose always, left, or right.
Code
CSS Examples Each snippet focuses on page-break-before. Confirm with Print Preview. Use Try It Yourself for a live editor.
1. Always 2. Avoid 3. Auto Example 1 — Force a Page Break Start each chapter heading on a new printed page.
<style>
h1 {
page-break-before: always;
}
</style>
<p>Intro text.</p>
<h1>Chapter 1</h1>
<p>Starts on a new printed page.</p> Intro text
page break
Chapter 1 starts on a new printed page
Simulation only. Open Print Preview in the try-it editor to see a real break.
How It Works Mark the heading. Each h1 gets page-break-before: always.Force the break. That heading starts on a new printed page.Alias map. Browsers treat this like break-before: page.Verify in print. Screen layout usually will not show the split.Example 2 — Avoid a Break Ask the browser not to put a page break right before a note box.
<style>
.note {
page-break-before: avoid;
}
</style>
<p>Related paragraph.</p>
<div class="note">Keep this with the text above when possible.</div> Related paragraph
Keep this with the text above when possible.
avoid is a soft request. A forced break nearby can still win.
How It Works Mark the box. The note gets avoid.Soft request. The browser tries not to break immediately before it.Forced values win. A nearby always can still create a break.Modern twin. Prefer break-before: avoid in new CSS.Example 3 — Default Auto Leave break decisions to the print layout engine.
<style>
h2 {
page-break-before: auto;
}
</style>
<h2>Heading</h2>
<p>Break only if the page needs one.</p> Heading
Break only if the page needs one.
auto is the default. No forced break is added.
How It Works Use the default. auto neither forces nor forbids a break.Layout decides. The printer may still break before long content.Reset tool. Useful after clearing a previous always rule.Same as initial. initial also resolves to auto. Edge Cases & Pitfalls If nothing seems to break, one of these is usually why.
print Page breaks need print media Check Print Preview. Normal screen layout usually ignores the visual page split.
legacy always is not modern alwaysAs an alias, page-break-before: always maps to break-before: page , not the broader Level 4 always keyword.
block Needs a generated block box The property applies to block-level elements. If no box is generated, it is ignored.
avoid avoid is not a hard lockBrowsers try to honor it, but forced breaks and constrained page height can still win.
migrate Prefer break-before for new work Keep page-break-before only for older stylesheets. New print CSS should use break-before.
Compatibility
Browser Support page-break-before is a browser print layout property . Node.js, Deno, and Bun do not apply it.
✓ Legacy · Widely available
page-break-before Supported across modern browsers and older Internet Explorer for common print values. Prefer break-before for new CSS.
Google Chrome Supported
Full
Mozilla Firefox Supported
Full
Apple Safari Supported
Full
Microsoft Edge Supported
Full
Opera Supported
Full
Samsung Internet Supported
Full
Internet Explorer 4+
Full page-break-before Widely supported
Bottom line: Safe as a legacy print property. For new projects, use break-before and treat page-break-before as compatibility-only.
Remember
Key Takeaways Role: control a print page break before a block box.
Common values: auto, always, avoid.
Initial value: auto. Not inherited. Deprecated alias of break-before.
Migration: replace always with break-before: page.
One line: page-break-before is the old print-before-break control — learn it, then use break-before.
Frequently Asked Questions What does the CSS page-break-before property do? It controls whether a page break happens before an element when printing. Values can force a break, avoid one, or leave the choice to the browser.
What is the default value of page-break-before? The initial value is auto. The browser may insert a page break before the element when the print layout needs one.
Is page-break-before deprecated? Yes. It is a legacy alias kept for older pages. New CSS should use break-before instead. Browsers still support page-break-before for compatibility.
What is page-break-before: always mapped to? For compatibility, browsers treat page-break-before: always like break-before: page. That forces a page break before the element in print.
Why do I not see the break on screen? Page breaks apply in paged media such as Print Preview. Normal screen layout usually does not show a visible split.
Which browsers support page-break-before? It is widely available in all major browsers, including older Internet Explorer. It is a browser print layout property, not a Node.js feature.
About the author Developer, cloud engineer, and technical writer
I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.
8 people found this page helpful
Helpful Share Copy link Suggestion