Style orphans Property

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP







<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->




Style orphans Property


❮ Style Object



Example


Change the orphans and check print or print preview:



<html>

<head>

<script>

function ChangeOrphans()


  document.getElementById("p1").style.orphans = document.getElementById("orphans").value;


</script>

<style>

.othercontent


  width: 400px;

  border-top: 19cm solid #c3c3c3;



@page


  /* set size of printed page */

 
size:21cm 27cm;

 
margin-top:2cm;



@media print


 
.orphans


   
orphans:2;

  


</style>

</head>


<body>

<div class="othercontent">

<input id="orphans" value="2">

<button onclick="ChangeOrphans();">Change orphans</button>


<p style="font-size:120%" id="p1">

Change orphans and see the print preview.<br>

Line 2<br>

Line 3<br>

Line 4<br>

Line 5<br>

Line 6<br>

Line 7<br>

Line 8<br>

</p>


</body>

</html>

Try it Yourself »


Definition and Usage



The orphans property sets or returns the minimum number of lines for an element that must be
visible at the bottom of a page
(for printing or print preview).


The orphans property only affects block-level elements.


Tip: orphans:5 means that at least 5 lines must be visible above the
page break.


Tip: See the widows property to set or return the minimum number of
lines for an element that must be visible at the top of a page.



Browser Support














Property
orphans Yes Not supported Not supported Not supported Yes




<!--
mid_content, all: [300,250][336,280][728,90][970,250][970,90][320,50][468,60]
-->




Syntax


Return the orphans property:



object.style.orphans

Set the orphans property:



object.style.orphans = "number|initial|inherit"

Property Values










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

Technical Details








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


❮ Style Object
qe8AzIUl,jQRJWZhMv Hp625N8K UAhFt EuaOi,9oH,QN
PwwR6rp1JA u2,VOqDz4zVzRZevbm,v B6nP6pNb Flz,PbhLaKXz3,XJnl

Popular posts from this blog

Old paper Canadian currency

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế