🌐 What Are CSS Break Properties?
The properties break-after,break-before, andbreak-inside control how content breaks in:
- 📄 Multi-column layouts
- 📑 Printed pages (@media print)
- 📦 Paged media (ebooks, PDFs, reports)
- 📐 Regions (deprecated but still relevant historically)
📦 Syntax
break properties
break-after: auto | avoid | always | page | column | left | right;
break-before: auto | avoid | always | page | column | left | right;
break-inside: auto | avoid | avoid-page | avoid-column;📌 Values Explained
| Value | Meaning |
|---|---|
| auto | Default. Allows breaks when needed. |
| avoid | Avoids breaking at this element (applies to before/after/inside). |
| always | Forces a break before/after the element. |
| page | Force a page break (print). |
| column | Force a column break (multi-column layout). |
| left | Start a new left page (print books). |
| right | Start a new right page (print books). |
| avoid-page | Avoid page breaks inside an element. |
| avoid-column | Avoid column breaks inside an element. |
📘 1. break-after
Controls whether a break happens immediately after the selected element.
✔ Force a Column Break After an Element
break-after: column
h2 {
break-after: column;
}After each <h2>, content jumps to the next column.
✔ Create a Page Break After a Section (Print)
break-after: page
section.chapter {
break-after: page;
}Useful for PDFs, ebooks, reports.
📘 2. break-before
Controls whether a break occurs before the element.
✔ Start New Column Before Element
break-before: column
.important {
break-before: column;
}✔ Force New Page Before Chapter Heading
break-before: page
.chapter-title {
break-before: page;
}Ensures each chapter starts on a new page in printed formats.
📘 3. break-inside
Prevents content from breaking inside an element. Crucial for headings, images, cards, or boxes in columns.
✔ Prevent Images or Cards From Splitting
break-inside: avoid
img, .card, h2 {
break-inside: avoid;
}Ensures these elements stay whole inside a column or printed page.
✔ Avoid Column Breaks Inside a Block
avoid inside
.quote {
break-inside: avoid-column;
}🧪 Real-World Examples
1️⃣ Multi-Column Article With Clean Section Breaks
Article layout
article {
column-count: 3;
}
h2 {
break-before: column;
}
p, img {
break-inside: avoid;
}Ensures each section begins at the top of a column and prevents awkward splits.
2️⃣ Prevent Breaking Cards in a Masonry Layout
Masonry grid
.grid {
column-count: 4;
column-gap: 1rem;
}
.card {
break-inside: avoid;
margin-bottom: 1rem;
}Keeps each card intact — essential for Pinterest-style layouts.
3️⃣ Print Layout: Chapters Start on New Pages
Print chapters
@media print {
h1 {
break-before: page;
}
.section {
break-inside: avoid-page;
}
}4️⃣ Force Page Break After A Table When Printing
Print table break
table {
break-after: page;
}⚠️ Common Mistakes
- ❌ Thinking breaks affect Flexbox or Grid (they do not)
- ❌ Not combining breaks with multi-column or print contexts
- ❌ Overusing forced breaks → uneven layouts
- ❌ Using avoid on large elements → layout may fail to break at all
Note
🔥 Summary
The CSS break properties give fine control over how content flows across pages, columns, or other fragmented contexts. Use break-before and break-after to force breaks, and break-inside to prevent awkward splitting.
Learn more →MDN: CSS Fragmentation 📘
🌐 What Is break-after?
The break-after property controls whether apage break, column break, or region break should occurimmediately after an element. It is part of the CSS Fragmentation Module and is used in:
- 📄 Multi-column layouts
- 📑 Printed pages (@media print)
- 📘 Paged media (ebooks, PDFs)
Note
✔ Crucial for print layouts (manual page breaks)
✔ Works with page, column, and region fragmentation
📦 Syntax
break-after syntax
break-after:
auto | avoid | always | page | column | left | right | recto | verso;| Value | Meaning |
|---|---|
| auto | Default. Browser decides where to break. |
| avoid | Try to prevent a break after the element. |
| always | Always force a break after the element. |
| page | Force a page break (print). |
| column | Force a column break (multi-column layouts). |
| left | Next page must be a left page (print books). |
| right | Next page must be a right page (print books). |
| recto | Alias for right page. |
| verso | Alias for left page. |
📌 1. Force a Column Break After an Element
break-after: column
h2 {
break-after: column;
}After each <h2>, the next content begins in a new column. Useful for multi-column articles or magazines.
📌 2. Force a Page Break After an Element (Print Layout)
Page break
@media print {
.chapter-end {
break-after: page;
}
}Ensures each chapter ends with a page break when printing.
📌 3. Force a Break After Every Section
Section break
section {
break-after: always;
}Forces fragmentation after every section.
📌 4. Avoid a Break After an Element
Avoid break
.no-break {
break-after: avoid;
}Prevents unwanted breaks in columns or pages — useful for images, titles, etc.
📌 5. Using break-after With Multi-Column Layout
Multi-column layout
article {
column-count: 3;
}
h2 {
break-after: column;
}
p, img {
break-inside: avoid;
}Ensures each section starts at the top of a new column and prevents awkward splitting of paragraphs or images.
📌 6. Start New Left/Right Pages (Book Layouts)
Book formatting
@media print {
h1 {
break-after: right; /* Next page is a right-hand page */
}
}Used for professional publishing workflows.
🧪 Real-World Examples
1️⃣ Pagination for PDF Reports
Print report
@media print {
.page-break {
break-after: page;
}
}2️⃣ Avoid Split Cards in a Multi-Column Layout
Card split prevention
.card {
break-after: avoid;
break-inside: avoid;
}3️⃣ Create Magazine-Style Column Sections
Magazine design
h2 {
break-after: column;
}
.subheading {
break-after: avoid;
}⚠️ Common Mistakes
- ❌ Expecting breaks to work in Flexbox or Grid (they don’t)
- ❌ Using break-after without a multi-column or print context → no visible effect
- ❌ Forcing too many breaks → messy layout
- ❌ Using avoid on large blocks → layout might stretch awkwardly
Note
🔥 Summary
break-after gives fine control over where new columns or pages begin. It is essential for professional multi-column layouts, printing workflows, and paginated content like reports, ebooks, or documentation.
Learn more →MDN Docs 📘
🌐 What Is break-before?
The break-before property controls whether apage break, column break, or region break should occurimmediately before an element. It is part of the CSS Fragmentation Module and is used in:
- 📄 Multi-column layouts
- 📑 Page-based layouts (@media print)
- 📘 Paged media (ebooks, reports, PDFs)
Note
✔ Forces or avoids breaks before the element
✔ Similar to break-after, but triggers the break earlier
📦 Syntax
break-before syntax
break-before:
auto | avoid | always | page | column | left | right | recto | verso;| Value | Description |
|---|---|
| auto | Default. Browser decides when to break. |
| avoid | Avoids breaking before the element. |
| always | Always break before the element. |
| page | Force a page break before element. |
| column | Force a column break before element. |
| left | Next page must be a left-hand page (print books). |
| right | Next page must be a right-hand page. |
| recto | Alias of right. |
| verso | Alias of left. |
📌 1. Force a Column Break Before a Heading
break-before: column
h2 {
break-before: column;
}Ensures each <h2> starts at the top of a new column — great for multi-column articles or magazines.
📌 2. Force a Page Break Before a Chapter (Print)
Print page break
@media print {
.chapter-title {
break-before: page;
}
}Ensures every chapter begins on a fresh printed page.
📌 3. Start New Page Only on Right (Recto) Pages
Recto page
@media print {
h1 {
break-before: right; /* or recto */
}
}Used in book publishing to ensure titles always appear on right-hand pages.
📌 4. Avoid Breaks Before Elements
No break
.no-break-before {
break-before: avoid;
}Prevents undesirable breaks before elements like subtitles or images.
📌 5. Use in Multi-Column Layouts (Web + Print)
Columns + break-before
article {
column-count: 3;
column-gap: 40px;
}
h2 {
break-before: column;
}
p, img {
break-inside: avoid;
}Ensures major sections begin at the top of a column and content stays intact.
📌 6. Flow Content Across Pages in Reports
Report layout
@media print {
table {
break-before: page;
}
}Large elements like tables often benefit from starting on a new page.
🧪 Real-World Examples
1️⃣ PDF / Book Chapter Formatting
Chapter formatting
@media print {
.chapter {
break-before: page;
}
}2️⃣ Multi-Column Resume Layout
Resume example
.section-title {
break-before: column;
}3️⃣ Avoid Breaking Before Cards in a Masonry Grid
Card grid
.card {
break-before: avoid;
break-inside: avoid;
}⚠️ Common Mistakes
- ❌ Expecting breaks to affect Flexbox/Grid (they do not)
- ❌ Using break-before without multi-column or print context → no effect
- ❌ Overusing forced breaks → awkward spacing
- ❌ Using avoid on large blocks → layout can stretch unpredictably
Note
🔥 Summary
The break-before property gives fine control over where new pages or columns begin. It is invaluable for professional printing, ebook formatting, multi-column layouts, and long-form content.
Learn more →MDN Docs 📘
🌐 What Is break-inside?
The break-inside property controls whether content is allowed to break inside an element when the layout is fragmented. Fragmentation occurs in:
- 📄 Multi-column layouts
- 📑 Printed pages (@media print)
- 📦 Paged media (PDFs, ebooks, reports)
Note
✔ Essential for masonry layouts and multi-column text
✔ Works only in fragmented contexts (not Grid/Flexbox)
📦 Syntax
break-inside syntax
break-inside: auto | avoid | avoid-page | avoid-column;| Value | Description |
|---|---|
| auto | Default. Allows breaks inside the element. |
| avoid | Avoids any break inside the element. |
| avoid-page | Prevents page breaks inside (print). |
| avoid-column | Prevents column breaks inside. |
📌 1. Prevent Breaking Inside Cards (Masonry Layout)
Cards stay whole
.card {
break-inside: avoid;
}Ensures cards do not split across columns — essential in masonry-style layouts.
📌 2. Prevent Breaking Inside Images
No split images
img {
break-inside: avoid;
}Prevents images from splitting across printed pages or columns.
📌 3. Prevent Headings From Breaking
Heading protection
h2, h3 {
break-inside: avoid;
}Ensures headings stay grouped with their content.
📌 4. Prevent Splits Inside Tables (Print)
Tables stay together
@media print {
table {
break-inside: avoid-page;
}
}Essential when printing financial reports or documents with tabular data.
📌 5. Avoid Column Breaks Inside Quotes or Special Sections
Avoid breaking inside block
blockquote {
break-inside: avoid-column;
}Helps maintain readability and flow across columns.
📌 6. Use With Multi-Column Layout
Multi-column example
article {
column-count: 3;
}
p, img, h2 {
break-inside: avoid;
}Prevents awkward splits while reading multi-column text.
🧪 Real-World Examples
1️⃣ Pinterest-Style Masonry Layout
Masonry grid using columns
.grid {
column-count: 4;
column-gap: 1.5rem;
}
.card {
margin-bottom: 1.5rem;
break-inside: avoid;
}The browser arranges cards beautifully without splitting them.
2️⃣ Newsletter or Magazine Columns
Newsletter
.newsletter {
column-count: 2;
}
blockquote,
figure {
break-inside: avoid-column;
}Prevents quotes or images from getting split across columns.
3️⃣ Printing Reports Without Page Breaks in Sections
Print report
@media print {
.report-section {
break-inside: avoid-page;
}
}Keeps each report section intact across printed pages.
⚠️ Common Mistakes
- ❌ Expecting break-inside to work on Flexbox or Grid layouts
- ❌ Using avoid on very large elements → browser may still break if needed
- ❌ Forgetting that fragmentation context is required (columns or print)
Note
🔥 Summary
The break-inside property prevents unwanted splits inside content blocks when working with multi-column layouts orprinted/paged documents. Use it for images, cards, tables, quotes, and sections to maintain readability.
Learn more → MDN Docs 📘