w:docDefaults (Document Defaults)

Specifies the default paragraph and run formatting properties applied to all content that has no explicit style.

Parent elements

Description

w:docDefaults defines the default run and paragraph properties that apply to any text in the document when no style or direct formatting overrides them. It is defined in ECMA-376 Part 1 §17.7.5.1.

It contains two child elements:

  • w:rPrDefault — wraps a w:rPr with default run properties (font, size, language, etc.).
  • w:pPrDefault — wraps a w:pPr with default paragraph properties (line spacing, etc.).

These defaults form the lowest layer of the property-resolution hierarchy, below document styles and above nothing.

Attributes

Attribute Type Possible Values Description
(none) Properties are expressed via w:rPrDefault and w:pPrDefault child elements.

Examples

<w:docDefaults>
  <w:rPrDefault>
    <w:rPr>
      <w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/>
      <w:sz w:val="20"/>
      <w:lang w:val="en-US"/>
    </w:rPr>
  </w:rPrDefault>
  <w:pPrDefault>
    <w:pPr>
      <w:spacing w:after="160" w:line="259" w:lineRule="auto"/>
    </w:pPr>
  </w:pPrDefault>
</w:docDefaults>