Javascript Reference - HTML DOM Style widows Property








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

Browser Support

widows Yes Yes No No Yes

Syntax

Return the widows property:

var v = object.style.widows 

Set the widows property:

object.style.widows=number|initial|inherit;




Property Values

Value Description
number Visible line number. Negative values are not allowed. The default value is 2.
initial Set to default value
inherit Inherit from parent element.

Technical Details

Default Value: 2
Return Value: A string representing the minimum number of lines to print at the top of the page
CSS Version CSS2