Controlling Widows and Orphans

CSS offers a number of other features that help control how Web pages are printed. Unfortunately, only widows and orphans are supported, and only by Opera. I’ll give you a quick synopsis, nonetheless.

To control widows and orphans:

  • If desired, in the style rule, type orphans: n;, where n is the minimum number of lines that should appear at the bottom of a page.
  • If desired, in the style rule, type widows: n;, where n is the minimum number of lines in the element that should appear at the top of a page.

✓ Tips

  • Only Opera supports the orphans and widows properties.

  • It’s a shame that these features are not better supported by other browsers. However, things move so quickly that perhaps by the time you read this, things ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.