w:widowControl (Widow/Orphan Control)

Prevents a single line of a paragraph from appearing alone at the top or bottom of a page.

Parent elements

Description

w:widowControl is a toggle property that controls widow and orphan prevention. A widow is the last line of a paragraph printed alone at the top of a page; an orphan is the first line printed alone at the bottom. When this property is active (which is the default in most processors), the processor keeps at least two lines of the paragraph together when paginating.

It is defined in ECMA-376 Part 1 §17.3.1.44.

As with all ST_OnOff toggle properties:

  • Omitting the element entirely inherits the value from the style hierarchy.
  • <w:widowControl/> or <w:widowControl w:val="true"/> enables the control.
  • <w:widowControl w:val="false"/> disables it (allows single-line orphans/widows).

Attributes

Attribute Type Possible Values Description
w:val ST_OnOff true, false, 1, 0, on, off Toggles widow/orphan control. Omit to inherit; false disables.

Examples

<!-- Disable widow/orphan control for one paragraph -->
<w:p>
  <w:pPr>
    <w:widowControl w:val="false"/>
  </w:pPr>
  <w:r><w:t>This paragraph allows single-line orphans and widows.</w:t></w:r>
</w:p>

Notes

  • Widow/orphan control is enabled by default in most Word processors. You only need to specify <w:widowControl/> if you are overriding a style that has set it to false.
  • This property operates at paragraph-break boundaries. It has no effect when a paragraph fits entirely on one page.