Skip to content

<p> element

The <p> element contains the data for a single paragraph of text. There can be zero or more paragraphs per section.

Attributes

Attribute Description
width The width of the paragraph in pixels.
height The height of the paragraph in pixels.
left The left offset of the paragraph in pixels.
top The top offset of the paragraph in pixels.
styles Contains a semicolon delimited list of name:value pair style information values.

Styles

Style Description
numberingId Populated by MS Word for calculating leveled numbered lists.
numberingLevel Populated by MS Word for calculating leveled numbered lists.
alignment Text alignment, can be one of the following:- Left- Center- Right- Both- Distributed- Medium Kashida- Numbered Tab- High Kashida- Low Kashida- Thai Distributed
indenthanging Contains the hanging indent value in points.
indentfirstline Contains the first line indent value in points.
indentleft Contains the left indent value in points.
indentright Contains the right indent value in points.
spacebefore Contains the space to use before the paragraph in points.
spaceafter Contains the space to use after the paragraph in points.
linespacing Contains the line spacing to use for the paragraph expressed as a multiplier.
marginleft Contains the left margin in points.
hyperlinked Indicates if the paragraph is a hyperlink.
defaultFontSize The default font style to use, in points, when a run does not contain a font height.
backgroundColor The background color that should be shaded behind the paragraph text.
borderLeft Contains details (width, color, style) for the left border.
borderRight Contains details (width, color, style) for the right border.
borderTop Contains details (width, color, style) for the top border.
borderBottom Contains details (width, color, style) for the bottom border.
borderInternalVert Contains details (width, color, style) for the internal vertical borders.
borderInternalHorz Contains details (width, color, style) for the internal horizontal borders.
tabProps Contains the tab stops to use for this paragraph.
hasBarTabs Indicates that the paragraph uses bar tabs.
keepLinesTogether Indicates the paragraph has the “Keep Lines Together” feature enabled.
keepWithNextParagraph Indicates the paragraph has the “Keep With Next Paragraph” feature enabled.
minWidowOrphanLines Indicates the minimum number of lines to leave on a page when splitting paragraphs.
keepOnPage Indicates that the paragraph must not be moved to a new page.
pageBreakBefore Indicates that a page break should occur before the paragraph.
styleType Indicates the type of paragraph, can be one of the following:- Normal- Heading 1- Heading 2- Heading 3- Heading 4- Heading 5- Heading 6- Heading 7- Heading 8- Heading 9- Caption- Title- Sub Title- Strong
lineheight Indicates the minimum height that each line must take.
lineheightSize Indicates how the lineheight is to be applied, can be one of the following:- AtLeast- Exact- None
styleId Style id as a string.
nowrap Indicates that the paragraph should not wrap the text to new lines.
spacebeforeAuto Indicates that auto calculation of space before is enabled.
spaceafterAuto Indicates that auto calculation of space after is enabled.
contextualSpacing Indicates that contextual spacing is to be used, paragraphs that have the same style will merge the spaceBefore and spaceAfter values.
bulleted Indicates the paragraph is part of a bulleted list.
placeholder Indicates the type of placeholder, can be one of the following: 0 SlideNumber 1 Footer 2 Date

Children

Node Description
<line> A paragraph can contain zero or more <line> elements.
<table> A paragraph can contain zero or one <table> element.