<s>

Content that’s no longer accurate, such as an old price. The browser strikes it through.

Display
inline
Closing tag
Required
Permitted content
Phrasing content
On this page

Example

#
HTML
<p>
  React course:
  <s>$249</s>
  <strong>$149</strong>
</p>
<p><s>Paper certificate</s> We now issue certificates only as a PDF.</p>
Preview

Definition and usage

#

The <s> element marks information that’s no longer accurate or relevant: an old price in a sale, a sold-out product variant, or outdated opening hours. Browsers display it struck through by default.

The difference from <del> is subtle but important. <del> marks a fragment removed from the document during editing, e.g. in a terms-of-service changelog. <s> simply says: "this used to be true, but no longer is," without suggesting that anyone edited the text.

Most screen readers don’t announce the strikethrough by default. A user might therefore hear "$249 $149" with no context at all. It’s worth adding visually hidden text, e.g. "Regular price:" and "Sale price:".

Syntax

#
Syntax
<s>outdated content</s>

Attributes

#

This element has no attributes of its own. It supports the global attributes, such as class, id and hidden.

Default CSS

#

Most browsers display this element with these default styles:

CSS
s {
  text-decoration: line-through;
}

Browser support

#

Widely available

Works in all modern browsers, phones included. You can use it without worry.

  • Chrome
  • Edge
  • Firefox
  • Safari

Good practices

#
  • Mark changes to a document’s content, e.g. edits to a terms page, with <del> and <ins>.
  • The <strike> element is deprecated. Use <s> or <del> instead.
  • If the strikethrough carries important information, e.g. with prices, add visually hidden text for screen readers.

Related entries

#

Spotted a mistake or missing an example? Write to us.