The widows property helps you control how text breaks across pages and columns so stray lines do not appear alone at the top of a new column or page.
01
Top lines
Minimum at break top.
02
Syntax
Positive integers.
03
Default 2
Two lines by default.
04
Columns
Multi-column layouts.
05
Print
Paged media typography.
06
orphans Pair
Bottom-line partner.
Fundamentals
Introduction
The widows property in CSS is used to control the minimum number of lines of a block container that must be shown at the top of a page or column.
This property helps in preventing single lines (widows) from appearing at the top of a new page or column, which can improve the readability and visual flow of the text.
Definition and Usage
Think of a “widow” line as a lonely line stranded at the top of a column or page while the rest of the paragraph continued above the break. Setting widows: 3 tells the browser to keep at least three lines together at the top when possible.
Use it in articles, magazines, print stylesheets, and any multi-column text layout where clean breaks matter.
💡
Beginner Tip
Do not confuse widows with orphans. widows protects lines at the top of the next page or column; orphans protects lines at the bottom before the break. Use both together for balanced typography.
Foundation
📝 Syntax
The syntax for the widows property is simple. It can be applied to any block container element.
syntax.css
element{widows:<integer>;}
Here, the value is a positive integer specifying the minimum number of lines.
Basic Example
widows.css
p{widows:3;}
Syntax Rules
The value must be a non-negative integer such as 2 or 3.
It applies to block containers like paragraphs and divs with flowing text.
It is most effective when content can break across pages or columns.
Pair with orphans for balanced typography at both sides of a break.
The property is inherited.
Related Properties
orphans — minimum lines at the bottom before a break
column-count — creates multi-column layouts where widows matters
break-inside — controls whether elements may split across pages
line-height — affects how many lines fit in a column or page
Defaults
🎯 Default Value
The default value of the widows property is 2. This means that by default, at least two lines of a block container must be shown at the top of a page or column when possible.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
2
Prevent lone top line
widows: 3;
Partner property
orphans (bottom lines)
Best used in
Print and multi-column text
Value type
Non-negative integer
Inherited
Yes
Reference
💎 Property Values
The widows property accepts a single integer value.
Value
Example
Description
<integer>
widows: 3;
A positive integer specifying the minimum number of lines that must appear at the top of a page or column.
2 (default)
widows: 2;
Browser default — keep at least two lines at the top when possible.
inherit
widows: inherit;
Inherits the widows value from the parent element.
2 — default3 — common choiceorphans — bottom-line partner
Context
When to Use widows
widows is helpful whenever text flows across breaks:
Print stylesheets — Improve page breaks when users print articles or documentation.
Multi-column articles — Avoid a single line sitting alone at the top of a column.
Magazine-style layouts — Keep professional typography in long-form content.
Documentation PDFs — Pair with orphans for cleaner paged output.
News and blog columns — Reduce awkward breaks in responsive column layouts.
Preview
👀 Live Preview
Two-column text with widows: 3 and orphans: 3 for cleaner breaks:
When text flows across columns, a single line stranded at the top of a new column is called a widow. The widows property asks the browser to keep at least three lines together at the top when possible.
Good typography avoids awkward breaks that interrupt reading rhythm. Pair widows with orphans so both the bottom and top of each break look balanced.
Hands-On
Examples Gallery
In this example, we’ll ensure that at least three lines of a paragraph are shown at the top of a new page or column.
📜 Core Patterns
Set a minimum number of lines at the top of a page or column break.
Example 1 — Minimum top lines on a paragraph
In this example, we’ll ensure that at least three lines of a paragraph are shown at the top of a new page or column.
index.html
<style>p{widows:3;}</style><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit...</p>
Paragraph with widows: 3. When this text breaks across pages or columns, the browser tries to keep at least three lines at the top of the continuation.
How It Works
widows: 3 sets a minimum of three lines at the top of the next page or column segment when the browser can adjust the break.
Example 2 — Multi-column article layout
Apply widows in a two-column article to reduce lonely lines at column tops.
orphans protects bottom lines; widows protects top lines after a break.
Together they improve long-form reading in columns and print.
How It Works
orphans and widows address opposite sides of the same break, which is why typography guides recommend using both.
A11y
♿ Accessibility
Readability benefits everyone — Cleaner breaks help low-vision readers and reduce cognitive load when scanning long text.
Do not hide content — widows adjusts breaks; it should never remove text from the document.
Test print layouts — Verify printed documentation remains readable with sufficient contrast and font size.
Screen readers are unaffected — widows is a visual typography property; semantic HTML structure still matters most for assistive tech.
Companion
Pair with orphans
widows handles lines at the top of a break. The related orphans property sets the minimum number of lines that must stay at the bottom before the break.
typography-pair.css
article{orphans:3;widows:3;}
🧠 How widows Works
1
Text flows into columns or pages
Long paragraphs may break across layout regions.
Layout
2
widows sets a minimum top count
The integer value defines how many lines must appear at the top of the continuation.
Rule
3
Browser adjusts the break
When possible, the break moves to avoid a single widow line at the top.
Reflow
=
✅
Balanced typography
Readers see cleaner column and page breaks.
Compatibility
Browser Compatibility
The widows property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. Test your layouts across browsers, especially for print and multi-column use cases.
✓ Modern browsers · Widely supported
Print and column typography
Major browsers support widows for paged and multi-column text, with the strongest results in print preview.
95%Browser support
Google Chrome25+ · Desktop & Mobile
Full support
Mozilla FirefoxAll modern versions
Full support
Apple Safari1.3+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
OperaAll modern versions
Full support
Testing tip
Use browser print preview and multi-column layouts to verify widows behavior with your actual content length.
widows property95% supported
Bottom line:widows is well supported for print and column typography on the modern web.
Wrap Up
Conclusion
The widows property is a useful tool for web developers looking to improve the readability and visual flow of text on their web pages.
By ensuring that a minimum number of lines are shown at the top of a page or column, you can avoid awkward breaks and enhance the overall user experience. Experiment with different values to see how this property can benefit your web projects.