CSS page-break-inside Property

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

Definition and Usage

The page-break-inside property adjusts page breaks inside the current element in print and other paged media. Use it to keep a table, figure, or card from splitting awkwardly across two pages.

It is not inherited. The initial value is auto. Pair it with page-break-before and page-break-after in older print stylesheets.

Deprecated Prefer break-inside

page-break-inside is a legacy alias. Use break-inside in new CSS. auto and avoid map 1:1.

CSS Syntax

syntax.css
page-break-inside: auto | avoid | initial | inherit;

Unlike page-break-before, there is no always, left, or right here—only whether a break inside the box is allowed.

Property Values

ValueDescriptionTry it
autoDefault. A break inside the element is allowedTry it
avoidAvoid a page break inside the elementTry it
initialResets to autoTry it
inheritTakes the parent’s page-break-insideTry it

How to Use page-break-inside

Use it on blocks that should stay whole on one printed page, or migrate the rule to break-inside.

  1. Pick the block that should not split (table, figure, card, short list).
  2. Set page-break-inside: avoid on that element.
  3. Check the result in Print Preview (Ctrl+P / Cmd+P).
  4. For new CSS, rewrite as break-inside: avoid.
PieceRequired?Role
Block-level elementYesMust generate a box that can contain a break
Paged mediaYes (to see it)Print Preview or printed output
KeywordYesavoid to keep together; auto to allow splits
Modern replacementRecommendedbreak-inside: avoid

Live Preview

Screen layout cannot show real print pages. This demo simulates a split inside the marked box when you choose auto, and keeps the box whole when you choose avoid.

Use Print Preview on a real page to confirm. avoid aliases to break-inside: avoid.

Print simulation
Content before
Marked box — top half
Marked box — bottom half
Content after

page-break-inside: avoid

CSS Examples

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

Example 1 — Keep a Block Whole

Ask the browser not to split a figure across two printed pages.

CSS
<style>
  .figure {
    page-break-inside: avoid;
  }
</style>

<div class="figure">
  <p>Caption and image stay together.</p>
  <p>Prefer one page for this block.</p>
</div>
Try It Yourself

How It Works

  1. Mark the box. The figure gets page-break-inside: avoid.
  2. Soft request. The printer tries to keep the whole box on one page.
  3. Alias map. Browsers treat this like break-inside: avoid.
  4. Verify in print. Screen layout usually will not show the protection.

Example 2 — Default Auto

Allow the print engine to split the block if the page fills up.

CSS
<style>
  .article {
    page-break-inside: auto;
  }
</style>

<div class="article">
  <p>Long text may continue on the next page.</p>
  <p>A break inside is allowed.</p>
</div>
Try It Yourself

How It Works

  1. Use the default. auto neither forces nor forbids an inside break.
  2. Layout decides. Long content can continue on the next printed page.
  3. Reset tool. Useful after clearing a previous avoid rule.
  4. Same as initial. initial also resolves to auto.

Example 3 — Keep a Table Together

A common print fix: stop a small table from splitting mid-row group.

CSS
<style>
  table {
    page-break-inside: avoid;
  }
</style>

<table border="1">
  <tr><th>Item</th><th>Qty</th></tr>
  <tr><td>Pens</td><td>12</td></tr>
  <tr><td>Paper</td><td>50</td></tr>
</table>
Try It Yourself

How It Works

  1. Target the table. page-break-inside: avoid applies to the whole table box.
  2. Prefer one page. Small tables stay intact when space allows.
  3. Soft limit. A table taller than the page can still break.
  4. Modern twin. Prefer break-inside: avoid in new CSS.

Edge Cases & Pitfalls

If content still splits in print, one of these is usually why.

print

Page breaks need print media

Check Print Preview. Normal screen layout usually ignores the inside-break request.

avoid

avoid is not a hard lock

If the box is taller than the page, the browser may still split it. avoid is a preference.

values

No always keyword

This property only chooses auto vs avoid. Forcing a break uses page-break-before or break-before.

block

Needs a generated block box

Applies to block-level elements in normal flow. User agents may also apply it to table rows.

migrate

Prefer break-inside for new work

Keep page-break-inside only for older stylesheets. New print CSS should use break-inside.

Browser Support

page-break-inside is a browser print layout property. Node.js, Deno, and Bun do not apply it.

✓ Legacy · Widely available

page-break-inside

Supported across modern browsers and older Internet Explorer for auto and avoid. Prefer break-inside 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-inside Widely supported

Bottom line: Safe as a legacy print property. For new projects, use break-inside and treat page-break-inside as compatibility-only.

Key Takeaways

  • Role: control a print page break inside a block box.
  • Common values: auto and avoid only.
  • Initial value: auto. Not inherited. Deprecated alias of break-inside.
  • Migration: replace with break-inside: avoid (or auto).

One line: page-break-inside keeps a printed block together with avoid — learn it, then use break-inside.

Frequently Asked Questions

It controls whether a page break is allowed inside an element when printing. Use avoid to keep tables, figures, or cards from splitting across two pages.
The initial value is auto. The browser may insert a page break inside the element when the print layout needs one.
Yes. It is a legacy alias kept for older pages. New CSS should use break-inside instead. Browsers still support page-break-inside for compatibility.
The common keywords are auto and avoid. Global values like initial and inherit also work. Unlike page-break-before, there is no always value.
Page breaks apply in paged media such as Print Preview. Normal screen layout usually does not show a visible split inside the box.
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: paint-order

Learn how SVG and text painting order is controlled in CSS.

paint-order 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