w:body (Document Body)
Container for the block-level content that forms the main story of the document.
Parent elements
Description
w:body is the content container within w:document, holding all the visible content of the document. It is defined in ECMA-376 Part 1 §17.2.2.
w:body contains an ordered sequence of block-level elements: w:p (paragraphs), w:tbl (tables), w:sdt (structured document tags), w:bookmarkStart, w:bookmarkEnd, and revision elements. Its final child must be a w:sectPr that defines the last (or only) section’s layout properties.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
| (none) | — | — | All content is expressed via child elements. |
Examples
<w:body>
<w:p>
<w:r><w:t>First paragraph</w:t></w:r>
</w:p>
<w:tbl><!-- table content --></w:tbl>
<w:sectPr>
<w:pgSz w:w="12240" w:h="15840"/>
</w:sectPr>
</w:body>
new Body(
new Paragraph(
new Run(new Text("First paragraph"))),
new SectionProperties(
new PageSize { Width = 12240, Height = 15840 }));