HTML DOM Style orphans Property Last Updated : 17 Aug, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. Example-1: Set number of liones for orphans property. html <!DOCTYPE html> <html> <head> <title> HTML | DOM Style orphans Property </title> <div id="element"> <p> Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML.[1] CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript. </p> <p> <span style="color: red; font-weight: bold"> CSS is designed to enable the separation of presentation and content, including layout,colors, and fonts.CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors,and a declaration block. </span> </p> <p> This separation can improve content accessibility, provide more flexibility and control in the specification of presentation characteristics, enable multiple web pages to share formatting by specifying the relevant CSS in a separate .css file, and reduce complexity and repetition in the structural content. </p> <p> Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for alternate formatting if the content is accessed on a mobile device. </p> <p> The name cascading comes from the specified priority scheme to determine which style rule applies if more than one rule matches a particular element. This cascading priority scheme is predictable. </p> </div> <style> #element { columns: 12em 3; column-gap: 3em; } </style> <script> function myFunction() { // Number of lines that can be left at the end // of a page or column. document.getElementById("element").style.orphans = "5"; } myFunction() </script> </head> </html> Output : As per orphans property, minimum of 5 lines will be left on the page or column(as we set orphans property "5" in the code) if a paragraph is going to split. Supported Browsers: The browser supported by HTML | DOM Style orphans Property are listed below: Google Chrome 25+ Internet Explorer 8+ Opera 9.2+ Comment More infoAdvertise with us Next Article HTML | DOM Style opacity Property C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM Style opacity Property The Style opacity property in HTML DOM used to set opacity level for an element. Opacity level defines the transparency level where value 1 represents not transparent, 0.5 represents 50% transparency and 0 represents completely transparent.It also returns opacity level of an element. Syntax: It retu 2 min read HTML | DOM Style outlineStyle Property The Style outlineStyle property in HTML DOM is used to set or return the style of the outline around an element. Syntax: It is used to return the outlineStyle property.object.style.outlineStyleIt is used to set the outlineStyle property.object.style.outlineStyle = value Property Values: none: This i 2 min read HTML | DOM Style listStyle Property The Style listStyle Property in HTML DOM used to set up to three list properties namely list-style-typelist-style-positionlist-style-image Syntax: It returns the listStyle property.object.style.listStyleIt used to set the listStyle property.object.style.listStyle = "type position image|initial|inher 2 min read HTML | DOM Style outlineColor Property The DOM Style outlineColor Property is used to sets or returns the color of the outline around an Element. Syntax: It is used to Return the outlineColor propertyobject.style.outlineColor it is used to Set the outlineColor propertyobject.style.outlineColor = "color|invert|initial|inherit" Property Va 2 min read HTML DOM Style display Property The HTML DOM Style display property is used to set or return the display type of an element. It is similar to the visibility property, which displays or hides the element. With a slight difference in display: none, hiding the entire element, while visibility: hidden meaning only the contents of the 3 min read HTML | DOM Style fontFamily Property The fontFamily property set/return a list of Font-Family names and generic-family names for text in an element. The web browser will implement the first value it recognizes. Syntax: It returns the fontFamily property.object.style.fontFamilyIt sets the fontFamily Property.object.style.fontFamily = "f 2 min read Like