Fragmentation
suggest changeFragmentation properties control breaks across pages, columns, and other fragmentation contexts:
| Property | Purpose |
|---|---|
break-before |
Control a break before the box. |
break-after |
Control a break after the box. |
break-inside |
Control breaks within the box. |
orphans |
Set the minimum lines left at the bottom of a page or column. |
widows |
Set the minimum lines carried to the next page or column. |
Common values include auto, avoid, page, column, left, and right, depending on the property and fragmentation context.
article {
break-after: page;
}
figure,
pre,
blockquote {
break-inside: avoid;
}
h2 {
break-after: avoid;
}
Avoidance is a request, not an absolute guarantee: the user agent may still break an oversized box. The older page-break-before, page-break-after, and page-break-inside properties are legacy aliases; use the break-* properties in new code.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents