[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

Paragraphs

The most basic unit of block-level content within a WordprocessingML document, paragraphs are stored using the p element (§2.3.1.22). A paragraph defines a distinct division of content with a WordprocessingML document which begins on a new line.

[Example: Consider the paragraph fragment "The quick brown fox jumped … " which is centered on a paragraph. The justification property is a paragraph level property, and therefore is expressed on the paragraph properties as follows:

<w:p>
<w:pPr>
<w:jc w:val="center"/>
<w:rPr>
<w:i/>
</w:rPr>
</w:pPr>

<w:r>
<w:rPr>
<w:i/>
</w:rPr>
<w:t xml:space="preserve">The quick brown fox jumped … </w:t>
</w:r>
</w:p>

Notice that each run specifies the character formatting information for its contents, and the paragraph specifies the paragraph level formatting (the center-justification). It is also notable that since leading and trailing whitespace is not normally significant in XML; some runs require a designating specifying that their whitespace is significant via the xml:space element. end example]

A paragraph's properties are specified via the pPr element (§2.3.1.25; §2.3.1.26). [Note: Some examples of paragraph properties are alignment, border, hyphenation override, indentation, line spacing, shading, text direction, and widow/orphan control. end note]