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 | |||||
8 | 12 | 25 | X | 9.2 | 1.3 |
Tablets / Mobile | |||||
![]() |
|||||
≤37 | 25 | X | X | 1 | X |
Last updated by CSSPortal on: 1st November 2019