The CSS and ePUB specifications support these two properties, widows and orphans, which set the minimum number of lines that must be left at the top or bottom of a page, i.e. to avoid leaving single lines at any of these places.
I don't know, however, how these properties work when they are specified for elements that contain other block elements inside, for instance:
Code:
<div style="widows=2;orphans=2;">
<p>I kiss the lips of no fair maid,</p>
<p>Nor wet mine with the foaming wine</p>
<p>Within the beaker’s gold.</p>
<p>A cheek upon whose rose-leaf shade</p>
<p>Mine eyes have lit a glow divine,</p>
<p>A look which shyly seeketh mine,</p>
<p>These leave me still and cold.</p>
</div>
The intent here is preventing a pagebreak that would cause a single line (the minimum is 2) appearing at the top or bottom of a page. But would this work or would a pagebreak be allowed anyway if it occurs after after a block element, <p>...</p>?
In principle, "page-break-inside:avoid" would prevent any page break inside the stanza, but I don't want to be so restrictive...