orphans
Summary
In typography terms, an orphan is the first line of a paragraph that is left behind on the old page while the paragraph continues on the next. The orphans CSS property refers to the minimum number of lines in a block container that must be left at the bottom of the old page. This property is normally used to control how page breaks occur. This property only affects paged media such as print. For example, if a paragraph can’t fit on one page in its entirety it is split wherever it is possible. In this way single lines of a paragraph can appear on page before it continues on the next page. This is usually unwanted, so many word processors require at least two lines to be left on an old page, instead of one. You can give it either a positive number (where 2 is the default) or inherit.
Note that the orphan property does not generally affect non-paged media such as screen. However, browsers supporting both orphans and columns will apply the intended functionality to columns as well. Also, the property only affects block-level elements.
Overview table
- Initial value
2
- Applies to
- Block containers
- Inherited
- Yes
- Media
- visual
- Computed value
- As specified
- Animatable
- No
- CSS Object Model Property
orphans
Syntax
orphans: inherit
orphans: integer
Values
- integer
- Only positive values are allowed.
An Integer that specifies or receives the minimum number of lines to print at the bottom of a page.
- 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 bottom and top 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 Paged Media Module Level 3
- W3C Editor’s Draft
- CSS Level 2 (Revision 1)
- W3C Reccomendation
See also
Related pages
- widowswidows
- CSSStyleDeclarationCSSStyleDeclaration
- currentStylecurrentStyle
- runtimeStyleruntimeStyle
- stylestyle
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]