The page-break-after property controls page breaks after 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 after headings.
04
Left / Right
Facing-page layouts.
05
avoid
Keep content together.
06
@media print
Print-only rules.
Fundamentals
Introduction
The page-break-after property in CSS is used to control the behavior of page breaks after a specified element when printing a document.
This property is particularly useful for creating printable documents where control over page breaks is necessary, such as reports, invoices, or other formatted documents.
Definition and Usage
The page-break-after property can be applied to block-level elements when you need the content that follows to start on a new printed page. For example, you can force each chapter heading to end its page so the next chapter begins cleanly.
Like other print properties, page-break-after 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-after may have little visible effect. It shines in print preview where the browser paginates your document.
Foundation
📝 Syntax
The syntax for the page-break-after property is straightforward. It can be applied to block-level elements, and it takes one of several keyword values.
syntax.css
element{page-break-after:value;}
Basic Example
page-break-after.css
@mediaprint{h1{page-break-after:always;}}
Syntax Rules
Apply page-break-after 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-after property as a replacement.
Defaults
🎯 Default Value
The default value of the page-break-after property is auto. This means the browser will automatically insert a page break after the element if necessary.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
auto
Applies to
Block-level elements
Inherited
No
Animatable
No
Common use
Print page breaks after block elements
Reference
💎 Property Values
The page-break-after property accepts keyword values that control page-break behavior after an element when printing.
Value
Example
Description
auto
page-break-after: auto;
Allows the browser to automatically insert a page break if needed.
always
page-break-after: always;
Always insert a page break after the element.
avoid
page-break-after: avoid;
Avoid inserting a page break after the element.
left
page-break-after: left;
Insert one or two page breaks so the next page is formatted as a left page.
right
page-break-after: right;
Insert one or two page breaks so the next page is formatted as a right page.
initial
page-break-after: initial;
Sets the property to its default value (auto).
inherit
page-break-after: inherit;
Inherits the value from the parent element.
autoalwaysavoidleftright
Context
When Does page-break-after Matter?
page-break-after 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-after: always.
Books and manuals — Break after chapter headings so each chapter begins cleanly.
Readable grouping — Use avoid to keep headings with the paragraphs that follow them.
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-after: always. When printing, content after the break marker starts on a new page.
Page 1 Chapter 1 content flows here.
page-break-after: always
Page 2 Chapter 2 starts on a new page.
Hands-On
Examples Gallery
Start with the reference chapter example, try forced breaks, keep headings with their content, and explore left/right facing-page rules.
🖨 Print Page Breaks
Use page-break-after: always inside @media print to start new pages after chapter headings — the same pattern from the reference example.
Example 1 — Chapter Headings in Print
In this example, we’ll ensure that a page break always occurs after a heading when printing the document.
page-break-after-example.html
<style>@mediaprint{h1{page-break-after:always;}}</style><h1>Chapter 1</h1><p>This is the first chapter.</p><h1>Chapter 2</h1><p>This is the second chapter.</p>
Open print preview (Ctrl+P) to see the page break after each h1:
Chapter 1
This is the first chapter.
Chapter 2
This is the second chapter.
How It Works
Each h1 ends its printed page because of page-break-after: always. The next chapter begins on a fresh page, which is a common pattern for books and reports.
Example 2 — Always Break After a Section
Force a page break after a block element so the following section starts on a new printed page.
page-break-always.html
<style>.section-end{page-break-after:always;}</style><h1>Report Section A</h1><p>Content for the first section.</p><divclass="section-end"></div><h1>Report Section B</h1><p>This section starts on a new page when printed.</p>
The paragraph stays with the heading instead of breaking away.
How It Works
avoid tells the browser not to insert a break right after 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 next page should be a left or right page in paged media.
.cover { page-break-after: right; } — next page is a right page
.appendix { page-break-after: left; } — next page is 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-after vs break-after
page-break-after is the legacy print property. The modern replacement is break-after, which also supports column and region breaks.
In legacy stylesheets, page-break-after: always is equivalent to break-after: page. When writing new CSS, prefer break-after for better long-term support.
legacy-vs-modern.css
/* Legacy */h1{page-break-after:always;}/* Modern equivalent */h1{break-after:page;}
🧠 How page-break-after 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-after on an element
Choose always, avoid, left, or right to control the break after that element.
CSS rule
3
The browser applies the break rule
Following content moves to the next 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-after property is widely supported in modern browsers. It works reliably in browsers such as Chrome, Firefox, Safari, Edge, and Opera. This property is primarily used for print styles, so testing should be done by previewing the print version of your document in these browsers.
✓ Legacy · Print support
Reliable print page-break control
Chrome, Firefox, Safari, Edge, and Opera support page-break-after 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-after rules. For new projects, consider migrating to break-after.
page-break-after property96% supported
Bottom line:page-break-after remains widely supported for print. Always test in print preview, and prefer break-after in new stylesheets.
Wrap Up
Conclusion
The page-break-after property is an essential tool for creating well-formatted, printable documents.
By controlling where page breaks occur after specific elements, you can ensure that your printed content appears organized and professional. Experiment with different values to achieve the desired layout for your print media.
Use page-break-after: always for print chapters and report sections
Scope print breaks inside @media print
Use page-break-after: avoid on headings for readability
Test in print preview in every target browser
Migrate legacy rules to break-after 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-after in new projects when break-after 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-after
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-after
Modern replacement.
Companion
❓ Frequently Asked Questions
The page-break-after property controls whether a page break happens after an element when printing. It is used to start new pages after chapters, sections, or other blocks in printable documents.
The default value is auto. The browser inserts a page break only when the layout needs one.
always forces a page break after the element when printing. avoid tries to prevent a break immediately after the element so related content stays together.
Use it in print stylesheets for reports, invoices, books, and any document where you need predictable page breaks after headings or sections.
page-break-after is the older legacy property for print. break-after is the modern replacement. Browsers still support page-break-after, but new projects should prefer break-after.