The HTML <s> Tag (Strikethrough)

The HTML s tag is an inline element, which creates a strikethrough text effect. A strikethrough represents a section of text that is no longer relevant but is still readable as it only has a thin line running horizontally through the middle of each character.

 

Examples

s tags require an opening and closing tag which wrap the area of text that should have a strikethrough effect. Let's try out a couple of examples.

 

<p>The quick brown <s>fox</s> cat jumps over the lazy dog.</p>

The quick brown fox cat jumps over the lazy dog.

 

Since s is an inline element it can be used inside other text effect HTML elements such as strong without causing validation errors.

 

<p>The quick brown <strong><s>fox</s></strong> cat jumps over the lazy dog.</p>

The quick brown fox cat jumps over the lazy dog.

 

Browser Support

The s tag is supported by all popular web browsers including Google Chrome (1+), Internet Explorer (2+), Firefox (1+), Safari (1+) and Opera (4+).

 

If you are using strike tags in your HTML they should be replaced with s which is the successor to strike.

 

Conclusion

You now know how to create strikethrough text in HTML.

text style

Related Tutorials

 thumbnail

The HTML <del> Tag

December 30, 2020