CSS widows Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The widows property sets the minimum number of lines from a block that must appear at the top of a page, region, or column after a break. In typography, a widow is a lonely last line left alone at the top while the paragraph continues from a previous fragment.

It only matters when content can fragment — print pages, multi-column layouts, and similar breaks. Pair it with orphans (lines at the bottom before a break). The property is inherited. The initial value is 2.

Limited availability.

Not deprecated, but not Baseline. Chrome, Safari, Edge, and Opera support it. Firefox does not — there it behaves like allowing a single-line widow.

CSS Syntax

syntax.css
widows: <integer> | initial | inherit;

Example: widows: 3;. The integer must be positive (1 or greater).

Property Values

ValueDescriptionTry it
<integer>Minimum lines shown at the top after a break. Default 2Try it
1Allows a single line at the top (true widow possible)Try it
3 or higherStricter: more lines must appear together at the topTry it
initialSets this property to its default value, 2Try it
inheritInherits this property from the parent elementTry it

How to Use widows

Create a layout that can break, then set how many lines must appear at the top of each new fragment.

  1. Use a fragmentation context: print pages, or columns / column-count on screen.
  2. Set widows on the block (or a parent — it is inherited). Start with 2 or 3.
  3. Optionally set orphans for the bottom of the previous fragment.
  4. Test in Chrome or Safari. Expect no effect in Firefox today.
PieceRequired?Role
Page, column, or region breakYesWithout a fragment break, nothing changes
Positive integerYesMinimum lines at the top of the next fragment
Block containerYesApplies to blocks that hold line boxes
orphansOptionalCompanion control for the previous fragment’s bottom

Live Preview

A short multi-column box. Change widows and watch how paragraph breaks prefer more lines at the top of a column (supporting browsers only).

Uses three columns and a fixed height so breaks appear. Firefox ignores widows.

Columns

Short first paragraph for the column demo.

This longer second paragraph has more words so it can split across columns when the box is short enough. Watch the top of each column as you change widows.

A third paragraph adds one more block for the break to consider.

widows: 2

CSS Examples

Each snippet focuses on widows inside a multi-column box so you can study breaks on screen. Use Try It Yourself for a live editor.

Example 1 — Multi-Column Widows

Keep at least two lines at the top of a column after a paragraph break.

CSS
<style>
  section {
    columns: 3;
    column-fill: auto;
    height: 120px;
    widows: 2;
  }
</style>

<section>
  <p>First short paragraph.</p>
  <p>Second paragraph with enough text to spill into later columns when the box is short.</p>
  <p>Third paragraph for another break chance.</p>
</section>
Try It Yourself

How It Works

  1. Create columns. columns: 3 makes a fragmentation context on screen.
  2. Limit height. height: 120px with column-fill: auto fills the first column before the next.
  3. Set widows: 2. Supporting browsers avoid leaving a single line alone at a column top when they can.
  4. Paragraphs are the blocks. The rule applies to how their line boxes may break across columns.

Example 2 — Stricter Widows

Require three lines at the top — a stricter rule than the default.

CSS
<style>
  section {
    columns: 3;
    column-fill: auto;
    height: 120px;
    widows: 3;
  }
</style>

<section>
  <p>First short paragraph.</p>
  <p>Second paragraph with enough text to spill into later columns when the box is short.</p>
  <p>Third paragraph for another break chance.</p>
</section>
Try It Yourself

How It Works

  1. Same column setup as Example 1 so you can compare.
  2. Raise the minimum. widows: 3 asks for three lines at the top after a break.
  3. Breaks may move earlier. The browser may push more of the paragraph into the next column to satisfy the rule.
  4. Too high can look odd. Very large values can force awkward empty space if a paragraph cannot satisfy the count.

Example 3 — Print Stylesheet

Apply widows (and orphans) when printing articles.

CSS
<style>
  @media print {
    p {
      orphans: 3;
      widows: 3;
    }
  }
</style>

<article>
  <p>Printed paragraphs keep more lines together at page breaks.</p>
</article>
Try It Yourself

How It Works

  1. Scope to print. @media print applies the rule only when printing or in print preview.
  2. Set both ends. orphans: 3 guards the bottom; widows: 3 guards the top of the next page.
  3. Target paragraphs. Inheritance would also work from article or body.
  4. Screen stays unchanged. Continuous screen layout has no page break, so you will not see the effect until you print.

Edge Cases & Pitfalls

If nothing changes, you usually lack a break — or you are in Firefox.

firefox

Firefox does not support widows

Treat support as progressive enhancement. Demos look like widows: 1 in Firefox.

break

No fragment break, no visible effect

A tall single-column screen layout never fragments. Use print preview or columns to test.

vs

Widows vs orphans

widows = top of the next fragment. orphans = bottom of this one. You often set both.

value

Only positive integers

Valid values are 1 and up. Zero or negative values are invalid for this property.

break-*

Other break controls still matter

break-inside and older page-break-inside can prevent splits entirely — then widows never comes into play.

Browser Support

widows is a browser CSS property for fragmentation (pages and columns). Node.js, Deno, and Bun do not apply it.

✓ Limited availability · Not Baseline

widows

Supported in Chrome 25+, Safari 7+, Edge 12+, Opera, and IE 8+. Not supported in Firefox (desktop or Android).

95% Supporting engines
Google Chrome 25+
Full support
Mozilla Firefox No support
No support
Apple Safari 7+
Full support
Microsoft Edge 12+
Full support
Opera Supported
Full support
Samsung Internet Supported
Full support
Internet Explorer 8+
Full support
widows Limited · No Firefox

Bottom line: Useful progressive enhancement for print and multi-column typography. Do not depend on it for critical layout in Firefox. This is not a JavaScript runtime API.

Key Takeaways

  • Role: minimum lines kept at the top of a page or column after a break.
  • Initial: 2. Inherited. Positive integers only.
  • Needs a break: pages, columns, or regions — not a continuous single column.
  • Limited support: fine in Chromium/WebKit; ignored in Firefox.

One line: widows stops lonely last lines at the top of a fragment — when the browser supports it.

Frequently Asked Questions

It sets the minimum number of lines from a block that must appear at the top of a page, region, or column after a fragmentation break. A widow is a lonely last line left alone at the top.
The initial value is 2. At least two lines are kept together at the top when the browser supports the property.
widows control the minimum lines at the top of the next page or column. orphans control lines left at the bottom before a break.
It only affects fragmentation breaks — pages, columns, and regions. A single continuous block with no column or page break will look unchanged.
Yes. It applies to block containers and is inherited. The value must be a positive integer (1 or greater).
It has limited availability. Chrome 25+, Safari 7+, Edge 12+, Opera, and IE 8+ support it. Firefox does not. It is a browser CSS property, not a Node.js feature.

Next: word-break

Learn how to control where words may break onto a new line.

word-break tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful