w:tblW (Table Width)

Specifies the preferred total width of the table using a value and unit type (dxa, pct, auto).

Parent elements

Description

w:tblW specifies the preferred width of the entire table. It is defined in ECMA-376 Part 1 §17.4.63.

The width can be expressed as an absolute value in twips (dxa), a percentage of the available text width (pct), or set to automatic (auto). This is a preferred width; the renderer may adjust it if cell contents require it.

Attributes

Attribute Type Possible Values Description
w:w ST_MeasurementOrPercent Integer value, interpreted according to w:type. The width value.
w:type ST_TblWidth dxa (twips), pct (fiftieths-of-a-percent, e.g. 5000 = 100%), auto (automatic), nil (no preferred width) Unit for w:w.

Examples

<!-- 100% of text width -->
<w:tblW w:w="5000" w:type="pct"/>

Notes

  • For pct, 5000 = 100%, 2500 = 50%.
  • dxa: 1440 twips = 1 inch, so 12240 = approximately 8.5 inches (letter width minus margins).