Skip to content
Related Articles

Related Articles

HTML | DOM Style orphans Property

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 07 Jun, 2022

The DOM Style orphans property controls the minimum number of lines in a paragraph split on the old page. The default value for orphans is inherited or 2(which means a minimum of 2 lines will be left on the page if a paragraph is going to get split). The DOM Style orphans property controls the minimum number of lines in a paragraph split on the old page. The default value for orphans is inherited or 2(which means a minimum of 2 lines will be left on the page if a paragraph is going to get split). Syntax:

  • Return the orphans property:
object.style.orphans
  • Set the orphans property:
object.style.orphans = "number|initial|inherit"
  • Property Values:
    • Number: An integer which specifies the number of lines that can be left at the end of a page or column. Negative values are not allowed.Default value is 2.
    • Initial: Sets the element to its initial value.
    • Inherit: The Element inherits its orphans property from parent element.
    • Google Chrome 25+
    • Edge 12+
    • Internet Explorer 8+
    • Opera 9.2+
    • Safari 1.3+
    • Firefox not supported
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!