w:vAlign (Vertical Text Alignment)

Specifies the vertical alignment of content within a page (in a section) or within a table cell.

Parent elements

Description

w:vAlign controls vertical alignment of content in two distinct contexts:

  1. Section (w:sectPr) — aligns the text block vertically on each page of the section.
  2. Table cell (w:tcPr) — aligns cell content vertically within the cell.

It is defined in:

  • §17.6.23 for the section context.
  • §17.4.84 for the table cell context.

Attributes

Attribute Type Possible Values Description
w:val ST_VerticalJc top, center, both, bottom Vertical alignment mode.

Values

Value Description
top Content starts at the top edge.
center Content is centered vertically.
both (Section only) Content is vertically justified (spread evenly between top and bottom margins).
bottom Content ends at the bottom edge.

Examples

<!-- Vertically center page content (cover page) -->
<w:sectPr>
  <w:vAlign w:val="center"/>
  <w:pgSz w:w="12240" w:h="15840"/>
</w:sectPr>

<!-- Vertically center content in a table cell -->
<w:tc>
  <w:tcPr>
    <w:vAlign w:val="center"/>
  </w:tcPr>
  <w:p><w:r><w:t>Centered cell</w:t></w:r></w:p>
</w:tc>

Notes

  • In the section context, w:val="both" is equivalent to “vertical justification” and distributes paragraphs evenly between the top and bottom margins.
  • In the table cell context, the both value is typically not supported by most processors; use top, center, or bottom for cells.
  • The default vertical alignment for both sections and cells is top.