widows
Summary
Defines the minimum number of lines that can appear in the beginning of a new page. In typography, a widow is the last line of a paragraph appearing alone at the top of a page, which is considered to look awkward. Setting the widows property to an integer higher than 1 prevents this.
On a non-paged media, like screen, the widows CSS property has no effect. It can have a number value or it can inherit the values from the parent element.
Overview table
- Initial value
2
- Applies to
- All elements
- Inherited
- Yes
- Media
- visual
- Computed value
- As specified
- Animatable
- No
- Percentages
- N/A
Syntax
widows: inherit
widows: integer
Values
- integer
- Denotes the minimum number of lines that can appear alone on the top of a new page. If the value is not positive, the declaration is invalid.
- inherit
- Takes the same specified value as the property for the element’s parent.
Examples
The following style rule ensures that at least three lines of a paragraph appear at the top (widows) and bottom (orphans) of each printed page.
@media print {
p {
widows: 3;
orphans: 3;
}
}
Notes
Remarks
The widows property takes precedence over orphans.
Related specifications
- CSS Fragmentation Module Level 3
- W3C Working Draft
- CSS Multi-column Layout Module
- W3C Candidate Reccomendation
- CSS Level 2 (Revision 1)
- W3C Recommendation
See also
Related articles
Paged Media
widows
External resources
http://xhtml.com/en/css/reference/widows/
Related pages
- orphansorphans
- CSSStyleDeclarationCSSStyleDeclaration
- currentStylecurrentStyle
- runtimeStyleruntimeStyle
- stylestyle
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]