w:strike (Single Strikethrough)
Applies a single horizontal strikethrough line through the text of the run.
Parent elements
Description
w:strike draws a single horizontal line through the centre of the run’s text glyphs. It is an on/off toggle property defined in ECMA-376 Part 1 §17.3.2.37.
Strikethrough is commonly used to indicate deleted or superseded content in a non-tracked-changes context. For revision tracking, use w:del instead. The double-line variant is w:dStrike.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, 1, on (enabled) / false, 0, off (disabled). Omitting the attribute is equivalent to true. |
Toggles single strikethrough on or off. |
Examples
<w:r>
<w:rPr>
<w:strike/>
</w:rPr>
<w:t>Strikethrough text</w:t>
</w:r>
new Run(
new RunProperties(new Strike()),
new Text("Strikethrough text"));
<!-- Cancel inherited strikethrough -->
<w:rPr>
<w:strike w:val="false"/>
</w:rPr>
new RunProperties(new Strike { Val = false });
Notes
- Toggle property:
w:val="false"cancels strikethrough from parent style. - For tracked deletion, use
w:delinstead. - Can coexist with
w:dStrike(both lines render). - Text content unchanged; strikethrough is visual only.
- Spell-checkers use original text, not rendered version.