The orphans
and widows
properties are also useful. The orphans property controls the number of lines left on their own at the end of a fragment. The widows property controls the number left on their own at the start of a fragment.
The orphans
and widows
properties take an integer as a value, which represents the number of lines to keep together at the end and start of a fragment, respectively. Note that these properties only work inside a block container, such as a paragraph. If the block has fewer lines in it than the number that you specify as a value, all lines will be kept together.
In the example below, we are using the orphans
property to control the number of lines left at the bottom of a column. You can change that value to see the effect on the breaking of the content.