Easy Tutorial
❮ Prop Area Search Prop Tableheader Colspan ❯

Style widows Property


Definition and Usage

The widows property sets or returns the minimum number of lines in an element that must be visible at the top of a page (used for printing or print preview).

The widows property only affects block-level elements.

Tip: widows:5 means that at least 5 lines must be visible below a page break.

Tip: The orphans property sets or returns the minimum number of lines in an element that must be visible at the bottom of a page.

Syntax

Setting the widows property:

Returning the widows property:

Value Description
number An integer that specifies the minimum number of visible lines. The default value is 2.
inherit The value of the widows property is inherited from the parent element.

Browser Support

Only Opera supports the widows property.


Example

Change the widows property for printing or print preview:

❮ Prop Area Search Prop Tableheader Colspan ❯