w:tabs is a container for one or more tab stop definitions that control where tab characters (\t or U+0009) position the insertion point within a paragraph. It is defined in ECMA-376 Part 1 §17.3.1.34.
Each child w:tab element specifies a tab position (in twips from the left margin), an optional leader character (like dots or dashes), and an alignment type (left, right, center, decimal). Tabs are commonly used in tables of contents, forms, lists, and columnar layouts.
When the document is edited, pressing the Tab key will move to the next defined tab stop position or to the default tab interval (typically 0.5 inches) if no custom stops are defined.
Attributes
Attribute
Type
Possible Values
Description
(none)
—
—
All tab definitions are expressed via child elements.
Child Elements
Child
Attributes
Example
Purpose
w:tab
w:val, w:leader, w:pos
<w:tab w:val="left" w:pos="1440"/>
Defines a single tab stop at position 1440 twips with left alignment. Can be repeated multiple times.
Tab Element Attributes
Attribute
Type
Values
Description
w:pos
ST_TwipsMeasure
Non-negative integer (e.g., 1440 = 1 inch)
Position of the tab stop from the left margin in twips.
w:val
ST_TabJc
left, center, right, decimal
Alignment type: where text aligns relative to the tab stop.
w:leader
ST_TabTc
none (default), dot, hyphen, underscore, heavy
Leader character that fills space before the tab stop.
var pPr = new ParagraphProperties(
new Tabs(
new TabStop { Val = TabStopValues.Left, Pos = 2160 }));
var para = new Paragraph(pPr,
new Run(new Text("Name")),
new Run(new TabChar()), // Tab character
new Run(new Text("John Doe")));
Multiple tabs with leaders (like table of contents)
<w:pPr>
<w:tabs>
<w:tab w:val="left" w:pos="1440"/>
<w:tab w:val="right" w:pos="5040" w:leader="dot"/>
</w:tabs>
</w:pPr>
<w:r><w:t>Chapter 1</w:t></w:r>
<w:r><w:tab/></w:r>
<w:r><w:tab/></w:r>
<w:r><w:t>1</w:t></w:r>
<!-- Result: "Chapter 1" left-aligned, then dots, then page number right-aligned -->
var pPr = new ParagraphProperties(
new Tabs(
new TabStop { Val = TabStopValues.Left, Pos = 1440 },
new TabStop { Val = TabStopValues.Right, Pos = 5040, Leader = TabStopLeaderCharValues.Dot }));
var para = new Paragraph(pPr,
new Run(new Text("Chapter 1")),
new Run(new TabChar()),
new Run(new TabChar()),
new Run(new Text("1")));
Decimal-aligned tab (for numbers)
<w:pPr>
<w:tabs>
<w:tab w:val="decimal" w:pos="2160"/>
</w:tabs>
</w:pPr>
<w:r><w:t>Price</w:t></w:r>
<w:r><w:tab/></w:r>
<w:r><w:t>$99.99</w:t></w:r>
<!-- Decimal point aligns at tab stop position 2160 -->
var pPr = new ParagraphProperties(
new Tabs(
new TabStop { Val = TabStopValues.Decimal, Pos = 2160 }));
var para = new Paragraph(pPr,
new Run(new Text("Price")),
new Run(new TabChar()),
new Run(new Text("$99.99")));
Tab Leaders Reference
Leader
Appearance
Use Case
none
No filler
Standard tab spacing
dot
…….
Table of contents, indexes
hyphen
—–
Formal documents, invoices
underscore
_____
Signature lines, forms
heavy
=====
Emphasis, cover pages
Tab Alignment Reference
Alignment
Behavior
Typical Use
left
Text starts at tab position
Column alignment
center
Text is centered on tab position
Center alignment
right
Text ends at tab position
Right alignment, numbers
decimal
Decimal point aligns at tab
Currency, decimals
Common Tab Stop Positions (Twips)
Position
Inches
Use
720
0.5”
Small indent
1440
1”
Standard indent
2160
1.5”
Deeper indent
2880
2”
Double indent
5040
3.5”
Far right (TOC)
7200
5”
Right edge (letter)
Advanced Tab Stop Scenario
Form with multiple columns:
<w:pPr><w:tabs><w:tabw:val="left"w:pos="1440"/><!-- Column 1 at 1" --><w:tabw:val="left"w:pos="3600"/><!-- Column 2 at 2.5" --><w:tabw:val="right"w:pos="7200"/><!-- Column 3 right-aligned at 5" --></w:tabs></w:pPr><w:r><w:t>Field 1</w:t></w:r><w:r><w:tab/></w:r><w:r><w:t>Field 2</w:t></w:r><w:r><w:tab/></w:r><w:r><w:t>Field 3</w:t></w:r>
var pPr = new ParagraphProperties(
new Tabs(
new TabStop { Val = TabStopValues.Decimal, Pos = 2160 }));
var para = new Paragraph(pPr,
new Run(new Text("USD 1234.56")),
new Run(new TabChar()),
new Run(new Text("1234.56")));
Tab Stop Alignment Values
Value
Behavior
Use Case
left
Text starts at tab position (default)
Labels, lists, standard columns
center
Text centers on tab position
Centered column headers
right
Text ends at tab position (right-aligned)
Right-aligned numbers, page numbers
decimal
Decimal point aligns on tab position
Financial tables, aligned decimals
Tab Position Conversion Reference
Distance
Twips
Formula
0.5 in
720
0.5 × 1440
1.0 in
1440
1.0 × 1440
1.5 in
2160
1.5 × 1440
2.0 in
2880
2.0 × 1440
3.0 in
4320
3.0 × 1440
3.5 in
5040
3.5 × 1440
1 cm
~567
1 cm × 567
Leader Character Options
Value
Character
Use Case
none
(blank)
Standard columns without leaders
dot
.....
Table of contents, price lists
hyphen
-----
Legal documents, formal listings
underscore
_____
Forms, signature lines
heavy
─────
Formal tables, emphasis
Notes
Default intervals: When no custom tabs are defined, Word uses default stops, typically every 0.5 inches.
Tab character: Represent tabs in XML with <w:tab/> run elements, not literal tab characters or whitespace; the character corresponds to U+0009.
Position units: All w:pos values are in twips (1/20 point); 1440 twips = 1 inch and 1 twip is approximately 0.05 mm.
Position origin: Positions are measured from the left margin, including paragraph indentation; indentation does not shift tab positions.
Multiple stops and performance: Up to 63 stops can be defined per paragraph, but 10-15 is a practical maximum; excessive stops may affect rendering.
Inheritance: Tab stops are defined at paragraph level and apply to its runs.
Leader characters: w:leader controls repeated filler characters between text and the tab position; none means no filler.
Alignment and locale: Decimal alignment uses the first period or comma in the text; format numbers for the target locale. RTL text reverses positioning conceptually while the XML remains unchanged.
Rendered width: Actual tab width depends on font and content; use alignment values to keep columns consistent.
Accessibility: Tabs should represent logical columns; complex tab layouts can confuse screen readers, so use semantic markup or lists when appropriate.
Forms: Tab stops work for simple forms; use tables for complex layouts.
Compatibility: Tab stops render consistently across Office versions and systems.
Privacy Notice
This site stores your theme preference and this acknowledgement in localStorage — no cookies, no tracking. When you use the contact form, your message is sent via Formspree (USA) to reach us.