Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
Properties
 orphans Property
orphans Attribute | orphans Property
New for Windows Internet Explorer 8
Note: This documentation is preliminary and is subject to change.

Sets or retrieves the minimum number of lines of a paragraph that must appear at the bottom of a page.

Syntax

HTML { orphans : nLines }
Scripting[ nLines = ] object.style.orphans [ = nLines ]

Possible Values

nLinesVariant that specifies or receives the minimum number of lines to print at the bottom of a page.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of 0. The Cascading Style Sheets (CSS) attribute is not inherited.

Remarks

This property applies when the document is printed. If there are fewer lines than necessary to satisfy this rule, the lines are moved to the following page. The widows attribute takes precedence over the orphans attribute.

This property requires Internet Explorer to be in IE8 mode rendering.

Example

The following style rule ensures that at least three lines of a paragraph appear at the bottom and top of each printed page.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<style type="text/css">
@media print {
    p {
        widows:3;
        orphans:3;
    }
}
</style>

Standards Information

This property is defined in Cascading Style Sheets (CSS), Level 2 Revision 1 (CSS2.1) World Wide Web link.

Applies To

currentStyle, runtimeStyle, style, A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PRE, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

See Also

widows
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker