CKTIS / CSS
orphans — minimum lines before a break
The CSS `orphans` property sets the minimum number of a block’s lines left before a page or column break. It complements `widows`, which controls lines after the break.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
orphans: <integer [1,∞]>;orphans constrains fragmentation of a block container establishing an inline formatting context. It counts line boxes before a fragmentation break, not words or elements. It matters in paginated or multicolumn layout, not ordinary text wrapping.
It accepts a positive integer; its initial value is 2, and it is inherited. Zero and negative values invalidate the declaration. orphans controls lines before a break, whereas widows controls lines after it.
If a block has fewer lines than the required minimum, it should stay together. This is not an unconditional guarantee: forced breaks take precedence, and constraints can be relaxed when there are insufficient break opportunities to prevent overflow.
In the example, the first column holds four lines. After two introductory lines, only two spaces remain, but orphans: 3 requires the entire three-line paragraph to move to the next column.
Examples
<!doctype html>
<meta charset="utf-8">
<title>orphans</title>
<style>
.columns {
width: 420px;
height: 80px;
column-count: 2;
column-gap: 20px;
column-fill: auto;
font: 16px/20px monospace;
}
p { margin: 0; }
.sample { orphans: 3; widows: 1; }
</style>
<div class="columns">
<p>Intro 1<br>Intro 2</p>
<p class="sample">Line 1<br>Line 2<br>Line 3</p>
</div>Result
Expected: column 1 contains Intro 1 and Intro 2; column 2 contains Line 1, Line 2 and Line 3.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.