Set Minimum Number of Visible Lines for an Element in JavaScript



Use the orphans property in JavaScript to set the minimum number of lines for an element that must be visible at the top of a page. You can try to run the following code to learn how to implement orphans property −

document.getElementById("p").style.orphans

This is how you can return the orphans property −

var res = object.style.orphans;

This is how to set the orphans property −

object.style.orphans='number|initial|inherit'
Updated on: 2020-06-23T13:02:06+05:30

127 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements