CSS widows Property

Description

The widows property sets the minimum number of lines of text, which is located on the next page when printing a document. This property works if all text is placed on two or more printed pages. If the value of the widows property conflicts with the value of orphans , then widows takes precedence and is considered first.

Initial value
2
Applies to
Block level elements
Inherited
Yes
Media
Visual, Paged
Computed value
As specified
Animatable
No
CSS Version
CSS2, CSS3
JavaScript syntax
object.style.widows

Syntax

widows: <integer>

Values

  • <integer>Denotes the minimum amount of lines that can stay alone on the top of a new page. If the value is not positive, the declaration is invalid.

Example

@media print { 
   p { 
      widows: 3; 
      orphans: 3; 
   } 
}

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
81225X9.21.3
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
≤3725XX1X

Last updated by CSSPortal on: 1st November 2019