HTML <s> tag

Updated: 10/11/2017 by Computer Hope

HTML s tagWhen writing in HTML, the <s> tag is an inline element used to create a strikethrough on a section of text. It is useful for designating text that is no longer relevant or correct in some way. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.

Note: To define text that has been replaced or deleted, use <ins> and <del> tags instead of <s>.

Example code

<p><s>We have six puppies left for sale.</s></p>
<p>We have five puppies left for sale.</p>

Example result

We have six puppies left for sale.

We have five puppies left for sale.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <s> tag does not have any unique attributes, it does utilize all of the standard attributes.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All versions All versions

Browser, Compatibility, HTML strike tag, Web design terms