CSS properties - widows

revision:


widows property

- specifies the minimum number of lines that must be left at the top of a page or column.

CSS syntax : widows: integer | initial | inherit;

Property values:

integer : specifies the minimum number of lines that must be left at the top of a page or column. Negative values are not allowed

initial : sets this property to its default value.

inherit : inherits this property from its parent element.

JavaScript syntax: object.style.widows="3"

example: widows property
code:
                    @media print {
                        orphans: 4;
                        widows: 2;
                    }