Skip to main content

Wordprocessing Tables

Cell Spacing Default

The space between adjacent cells and the edges of the table is specified with the <w:tblCellSpacing> element. Compare with tblCellMar--spacing is added outside of the text margins.

This property can be overridden by a table-level exception (<w:tblCellSpacing> within <tblPrEx>) or by the row cell spacing value (<w:tblCellSpacing> within <trPr>).

<w:tblPr>

<w:tblCellSpacing> w:w="144" w:type="dxa"/>

</w:tblPr>

Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.4.46.

Word 2007 Example:

Table Cell Spacing Default

Attributes:​

The attributes are:

AttributeDescription
wSpecifies the value of the width of the spacing. If omitted, the value is assumed to be 0.
typeSpecifies the units of the width (w) property. Possible values are: * dxa - Specifies that the value is in twentieths of a point (1/1440 of an inch) * nil - Specifies a value of zero If pct or auto is specified, the value is ignored. If the attribute is omitted, its value is assumed to be dxa.

The cellspacing property is applied at the table level:

<table cellspacing="30px" style="width: 100%;">

CSS Example:

AAABBBCCC
DDDEEEFFF
GGGHHHIII