w:pPr (Paragraph Properties)
Container for all formatting properties applied to a paragraph.
Parent elements
Description
w:pPr is the paragraph properties container, grouping all formatting properties for a w:p. It is defined in ECMA-376 Part 1 §17.3.1.26.
When w:pPr appears inside a w:style element, it defines the style’s paragraph properties. Common children include w:pStyle, w:jc, w:ind, w:spacing, w:numPr, w:keepNext, w:keepLines, w:outlineLvl, w:shd, w:pBdr, w:tabs, w:rPr (paragraph mark run properties), and revision mark properties.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| (none) | — | — | All paragraph properties are expressed via child elements. |
Examples
<w:p>
<w:pPr>
<w:pStyle w:val="Heading1"/>
<w:jc w:val="center"/>
<w:spacing w:before="240" w:after="120"/>
</w:pPr>
<w:r><w:t>Title Text</w:t></w:r>
</w:p>
new Paragraph(
new ParagraphProperties(
new ParagraphStyleId { Val = "Heading1" },
new Justification { Val = JustificationValues.Center },
new SpacingBetweenLines { Before = "240", After = "120" }),
new Run(new Text("Title Text")));