orphans Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:orphans

Example

Change the orphans and check print or print preview:

Property Values

Value Description
number An integer to set minimum number of visible lines. Negative values are not allowed. The default value is 2
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: 2
Return Value: A String, representing the minimum number of lines to print at the bottom of the page
CSS VersionCSS2

Demo Code

ResultView the demo in separate window


<!DOCTYPE html>
<html>
<body>

<p style="background:red;min-width:600px;" id="myP">The minimum width of this paragraph is set to 600px.</p>

<button type="button" onclick="myFunction()">test</button>

<script>
function myFunction() {/*from w w  w  .  j a  va  2 s.c  om*/
    console.log(document.getElementById("myP").style.orphans);
}
</script>

</body>
</html>

Related Tutorials