property

Widows — CSS reference

Sets the minimum number of line boxes of a block that should appear after a fragmentation break. It counts lines, not paragraphs or words. Five lines in an 80px column would leave one line in the next column; widows:2 moves a second line there.

Formal Syntax & Structure

css syntaxcss
widows: 2;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>widows</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}#m{width:300px;height:60px;column-count:2;column-gap:20px;column-fill:auto;background:#eef2f7;color:#162b39}.item{height:20px;box-sizing:border-box;break-inside:avoid;background:#dbeafe;line-height:20px}#m{height:80px}#lines{margin:0;font:16px/20px sans-serif;orphans:1;widows:2}</style><body><article id="m"><p id="lines"><span>One</span><br><span>Two</span><br><span>Three</span><br><span>Four</span><br><span>Five</span></p></article></body></html>
CSS Reference