The page-break-before property controls page breaks before an element when a document is printed. It is especially useful for reports, invoices, books, and any printable layout where each chapter or section should start on a new page.
01
Print Breaks
Control printed pages.
02
Syntax
auto, always, avoid.
03
Chapters
Break before sections.
04
Left / Right
Facing-page layouts.
05
avoid
Keep content together.
06
@media print
Print-only rules.
Fundamentals
Introduction
The page-break-before property in CSS is used when printing a document. It specifies whether a page break should occur before a particular element.
This property is useful for creating documents with well-defined sections or chapters, ensuring that specific elements start on a new page when printed.
Definition and Usage
The page-break-before property can be applied to block-level elements when you need that element to start on a new printed page. For example, you can force each new section heading to begin on a fresh page in a report or manual.
Like other print properties, page-break-before usually has little or no visible effect on a normal scrolling screen layout. Test your rules in the browser’s print preview to see the real result.
💡
Beginner Tip
On normal screen layouts, page-break-before may have little visible effect. It shines in print preview where the browser paginates your document.
Foundation
📝 Syntax
The syntax for the page-break-before property is straightforward. It can be applied to block-level elements, and it takes one of several keyword values.
syntax.css
element{page-break-before:value;}
Basic Example
page-break-before.css
h1{page-break-before:always;}
Syntax Rules
Apply page-break-before to block-level elements such as headings, sections, and divs.
The value is a keyword: auto, always, avoid, left, or right.
The property is not inherited — set it on the element where the break should occur.
Use inside @media print when you only want breaks when printing.
For new projects, consider the modern break-before property as a replacement.
Defaults
🎯 Default Value
The default value of the page-break-before property is auto. This means the page break behavior is determined by the browser.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
auto
Applies to
Block-level elements
Inherited
No
Animatable
No
Common use
Print page breaks before block elements
Reference
💎 Property Values
The page-break-before property accepts keyword values that control page-break behavior before an element when printing.
Value
Example
Description
auto
page-break-before: auto;
Allows the browser to decide whether a page break is needed.
always
page-break-before: always;
Always insert a page break before the element.
avoid
page-break-before: avoid;
Avoid inserting a page break before the element.
left
page-break-before: left;
Insert one or two page breaks before the element so the next page is formatted as a left page.
right
page-break-before: right;
Insert one or two page breaks before the element so the next page is formatted as a right page.
initial
page-break-before: initial;
Sets the property to its default value (auto).
inherit
page-break-before: inherit;
Inherits the value from the parent element.
autoalwaysavoidleftright
Context
When Does page-break-before Matter?
page-break-before only affects paginated output. These are the most common use cases:
Reports and invoices — Start each major section on a new printed page with page-break-before: always.
Books and manuals — Break before section headings so each chapter begins cleanly.
Readable grouping — Use avoid to prevent awkward page breaks immediately before headings.
Duplex printing — Use left and right when odd and even pages need specific facing-page layout.
On a normal scrolling web page, you may not see any effect — that is normal. Test in print preview to verify behavior.
Preview
👀 Live Preview
A visual guide to page-break-before: always. When printing, the element starts on a new page.
Page 1 Chapter 1 content flows here.
page-break-before: always
Page 2 Chapter 2 starts on a new page.
Hands-On
Examples Gallery
Start with the reference section example, try forced breaks before chapters, prevent awkward breaks, and explore left/right facing-page rules.
🖨 Print Page Breaks
Use page-break-before: always so headings or sections start on a new printed page — matching the reference example.
Example 1 — Section Headings in Print
In this example, we’ll ensure that a heading starts on a new page when printed.
page-break-before-example.html
<style>h1{page-break-before:always;}</style><h1>Section 1</h1><p>This is the first section of the document.</p><h1>Section 2</h1><p>This is the second section of the document, and it starts on a new page when printed.</p>
Open print preview (Ctrl+P) to see the page break before Section 2:
Section 1
This is the first section of the document.
Section 2
This is the second section of the document, and it starts on a new page when printed.
How It Works
The first h1 appears normally, but Section 2’s h1 starts on a new printed page because of page-break-before: always.
Example 2 — Always Break Before a Chapter
Force a page break before a chapter block so that section starts on a new printed page.
page-break-always.html
<style>.chapter-start{page-break-before:always;}</style><h1>Report Introduction</h1><p>Opening content for the report.</p><sectionclass="chapter-start"><h2>Chapter 1</h2><p>This chapter starts on a new page when printed.</p></section>
The .chapter-start section begins on a new printed page because of page-break-before: always on that block.
Example 3 — Avoid a Break Before a Heading
Use page-break-before: avoid to prevent an awkward page break immediately before a heading.
avoid-break.html
<style>@mediaprint{h2{page-break-before:avoid;}}</style><h1>Avoid break example</h1><p>Introductory paragraph at the end of a page.</p><h2>Section Title</h2><p>The browser tries not to insert a page break immediately before this heading.</p>
The browser tries not to break immediately before this heading.
How It Works
avoid tells the browser not to insert a break right before the element if it can be prevented — useful for keeping headings with their first paragraph in print.
📄 Facing Pages
Use left and right when printed documents need specific odd- or even-page layout in duplex printing.
Example 4 — Left and Right Page Breaks
Control whether the element starts on a left or right page in paged media.
.chapter-opener { page-break-before: right; } — element starts on a right page
.appendix-start { page-break-before: left; } — element starts on a left page
How It Works
The browser may insert one or two page breaks to satisfy the left/right requirement. This is most useful for book-style layouts and double-sided printing.
Companion
page-break-before vs break-before
page-break-before is the legacy print property. The modern replacement is break-before, which also supports column and region breaks.
In legacy stylesheets, page-break-before: always is equivalent to break-before: page. When writing new CSS, prefer break-before for better long-term support.
legacy-vs-modern.css
/* Legacy */h1{page-break-before:always;}/* Modern equivalent */h1{break-before:page;}
🧠 How page-break-before Works
1
Content is paginated for print
When you print or export to PDF, the browser splits the document into pages.
Print media
2
You set page-break-before on an element
Choose always, avoid, left, or right to control the break before that element.
CSS rule
3
The browser applies the break rule
The element starts on a new printed page, or the break is suppressed when avoid is used.
Layout engine
=
📄
Organized printed output
Chapters and sections start where you intend in the final printed document.
Compatibility
Browser Compatibility
The page-break-before property is supported in all modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It is also supported in Internet Explorer. However, as with any CSS property, it is good practice to test your website across different browsers to ensure compatibility.
✓ Legacy · Print support
Reliable print page-break control
Chrome, Firefox, Safari, Edge, and Opera support page-break-before for printed output.
96%Modern browser support
Google Chrome51+ · Desktop & Mobile
Full support
Mozilla Firefox65+ · Desktop & Mobile
Full support
Apple Safari10+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera38+ · Modern versions
Full support
Testing tip
Use the browser’s print preview to verify page-break-before rules. For new projects, consider migrating to break-before.
page-break-before property96% supported
Bottom line:page-break-before remains widely supported for print. Always test in print preview, and prefer break-before in new stylesheets.
Wrap Up
Conclusion
The page-break-before property is a valuable tool for controlling the layout of printed documents.
By using this property, you can ensure that certain elements start on a new page, improving the readability and organization of your printed content. Experiment with different values to see how they can enhance the presentation of your printed documents.
Use page-break-before: always for print chapters and report sections
Scope print breaks inside @media print
Use page-break-before: avoid on headings for readability
Test in print preview in every target browser
Migrate legacy rules to break-before when updating stylesheets
❌ Don’t
Expect visible breaks on normal single-column screen pages
Overuse forced page breaks — too many blank pages hurt readability
Use page-break-before in new projects when break-before is available
Apply break rules without testing the printed output
Forget that left and right only matter in duplex paged media
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about page-break-before
Use these points when controlling printed page breaks.
5
Core concepts
📄01
Print Only
Paged media focus.
Purpose
⚙02
auto Default
Browser decides.
Default
🖨03
always / avoid
Force or prevent.
Keywords
↔04
left / right
Facing pages.
Keywords
ba05
break-before
Modern replacement.
Companion
❓ Frequently Asked Questions
The page-break-before property controls whether a page break happens before an element when printing. It is used so chapters, sections, or other blocks start on a new page.
The default value is auto. The browser decides whether a page break is needed before the element.
always forces a page break before the element when printing. avoid tries to prevent a break immediately before the element.
Use it in print stylesheets for reports, invoices, books, and any document where sections or headings should start on a new page.
page-break-before is the older legacy property for print. break-before is the modern replacement. Browsers still support page-break-before, but new projects should prefer break-before.