CSS page-break-before Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

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-before

page-break-before is a legacy alias. Use break-before in new CSS. Note: always maps to break-before: page.

CSS Syntax

syntax.css
page-break-before: auto | always | avoid | left | right | initial | inherit;

Some engines also recognize recto and verso. Start with auto, always, and avoid.

Property Values

ValueDescriptionTry it
autoDefault. Neither forces nor forbids a breakTry it
alwaysAlways force a page break before the elementTry it
avoidAvoid a page break right before the elementTry it
left / rightForce a break so this element starts on a left or right pageTry it
initialResets to autoTry it
inheritTakes the parent’s page-break-beforeTry it

How to Use page-break-before

Use it only for print styles you maintain, or migrate the rule to break-before.

  1. Pick the block that should start a printed page (often a chapter heading).
  2. Set page-break-before: always so that block begins on a new page.
  3. Check the result in Print Preview (Ctrl+P / Cmd+P).
  4. For new CSS, rewrite as break-before: page.
PieceRequired?Role
Block-level elementYesMust generate a box
Paged mediaYes (to see it)Print Preview or printed output
KeywordYesalways, avoid, auto, and others
Modern replacementRecommendedbreak-before: page instead of always

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.

Use Print Preview on a real page to confirm. always aliases to break-before: page.

Print simulation
Content before
Marked block (page-break-before)
Content after

page-break-before: always

CSS Examples

Each snippet focuses on page-break-before. Confirm with Print Preview. Use Try It Yourself for a live editor.

Example 1 — Force a Page Break

Start each chapter heading on a new printed page.

CSS
<style>
  h1 {
    page-break-before: always;
  }
</style>

<p>Intro text.</p>
<h1>Chapter 1</h1>
<p>Starts on a new printed page.</p>
Try It Yourself

How It Works

  1. Mark the heading. Each h1 gets page-break-before: always.
  2. Force the break. That heading starts on a new printed page.
  3. Alias map. Browsers treat this like break-before: page.
  4. 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.

CSS
<style>
  .note {
    page-break-before: avoid;
  }
</style>

<p>Related paragraph.</p>
<div class="note">Keep this with the text above when possible.</div>
Try It Yourself

How It Works

  1. Mark the box. The note gets avoid.
  2. Soft request. The browser tries not to break immediately before it.
  3. Forced values win. A nearby always can still create a break.
  4. Modern twin. Prefer break-before: avoid in new CSS.

Example 3 — Default Auto

Leave break decisions to the print layout engine.

CSS
<style>
  h2 {
    page-break-before: auto;
  }
</style>

<h2>Heading</h2>
<p>Break only if the page needs one.</p>
Try It Yourself

How It Works

  1. Use the default. auto neither forces nor forbids a break.
  2. Layout decides. The printer may still break before long content.
  3. Reset tool. Useful after clearing a previous always rule.
  4. 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 always

As 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 lock

Browsers 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.

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.

98% Common print values
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.

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

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.
The initial value is auto. The browser may insert a page break before the element when the print layout needs one.
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.
For compatibility, browsers treat page-break-before: always like break-before: page. That forces a page break before the element in print.
Page breaks apply in paged media such as Print Preview. Normal screen layout usually does not show a visible split.
It is widely available in all major browsers, including older Internet Explorer. It is a browser print layout property, not a Node.js feature.

Next: page-break-inside

Learn the legacy property that controls breaks inside an element.

page-break-inside tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

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