CSS orphans Property
Example
div {
background-color: #8cffa0;
height: 150px;
columns: 3;
orphans: 3;
}
p {
background-color: #8ca0ff;
}
p:first-child {
margin-top: 0;
}
@media print {
div {
orphans: 5;
}
}
Meaning
The orphans property defines the minimum number of lines of a paragraph that must be left at the bottom of a page.
See the widows property.
Default value: | 2 |
Inherited: | Yes |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
orphans: integer|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
integer | Specifies the minimum number of lines that must be left at the bottom of a page or column. Negative values are not allowed. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
orphans: 2;
}