HTML5 <s> Tag

The HTML <s> tag is used to render text with a strikethrough, or a line through it. Use the <s> element to represent things that are no longer relevant or no longer accurate. However, <s> is not appropriate when indicating document edits; for that, use the <del> and <ins> elements, as appropriate.

The only content permitted inside this element is phrasing content. Both the starting and ending tag are mandatory for this element. The parent of the <s> tag can be any element that accepts phrasing content.

The following style is applied to this element by default:

s {
  text-decoration: line-through;
}

Here is an example of using this tag:

<p>Buy our Iced Tea and Lemonade!</p>
<p><s>Recommended retail price: $3.99 per bottle</s></p>
<p><strong>Now selling for just $2.99 a bottle!</strong></p>


<p><s>Today's Special: Salmon</s> SOLD OUT</p>

Attributes

This element only accepts global attributes.

Examples

See the Pen HTML s Tag by Tutorialio (@tutorialio) on CodePen.

Further Reading

  1. Read more about the HTML <s> element on MDN.
  2. You can also read the HTML <s> tag reference on W3C.

Reader Comments

1. You can register or login to post a comment. Asking readers to register improves the quality of discussion.

2. As a registered user, you will also get to access features like choosing between a light and dark theme or anything else that we might implement in future.

Follow Us For Updates

FacebookTwitterGoogle+
Go To Top