w:tblBorders (Table Borders)

Defines border styles for the outside edges and inside rules of the table.

Parent elements

Description

w:tblBorders specifies the border settings for the outside edges and inside grid lines of the entire table. It is defined in ECMA-376 Part 1 §17.4.39.

Each child element (w:top, w:bottom, w:left, w:right, w:insideH, w:insideV) describes one border position. Individual cell borders defined in w:tcBorders can override these table-level defaults.

Attributes

Attribute Type Possible Values Description
(none) All borders are specified via child border elements (w:top, w:bottom, w:left, w:right, w:insideH, w:insideV).

Each border child element supports:

Child attribute Type Possible Values Description
w:val ST_Border single, double, thick, dotted, dashed, dashDot, dashDotDot, triple, thinThickSmallGap, nil, none, etc. Border style. nil removes any border (stronger than none).
w:sz ST_EighthPointMeasure Positive integer in eighths-of-a-point (e.g. 4 = 0.5 pt, 8 = 1 pt) Border thickness.
w:space ST_PointMeasure Integer in points Space between border and content.
w:color ST_HexColorAuto 6-digit hex RGB or auto Border colour.

Examples

<w:tblBorders>
  <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
  <w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
  <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
  <w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
  <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
  <w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>
</w:tblBorders>