Skip to content
Tutorials Center
My learning

Topics

HTML Reference ยท Inline Text

The <s> element

Reference for the HTML <s> element: text that is no longer accurate or relevant, how it differs from <del>, accessibility notes, examples and technical details.

The <s> element marks text that is no longer accurate or no longer relevant, but that you still want readers to see: an old price next to a sale price, a sold-out ticket tier, or a plan that has been dropped. Browsers draw a line through it by default.

HTML
<p>Early-bird ticket: <s>$40</s> $28</p>

Try it

No longer accurate

The last paragraph shows the difference: <del> and <ins> record an edit to the document, while <s> simply says the text is out of date.

Attributes

This element has no attributes of its own. It accepts the global attributes.

Usage notes

  • <s> vs <del>. Use <del> when you are tracking a change to the document itself, for example in a changelog or a revised contract; it accepts cite and datetime. Use <s> when the content is fine but the fact it states has stopped being true.
  • Not for decoration. If you only want a line through text, use CSS: text-decoration: line-through.
  • Accessibility. Many screen readers do not announce strikethrough at all, so "$40 $28" may be read without any hint that $40 no longer applies. Add words when it matters, such as "was $40, now $28", or visually hidden text.
  • History. <s> was once a purely visual "strikethrough" tag, like the obsolete <strike>. HTML5 gave it its current meaning; <strike> should not be used.

Technical summary

Content categories Flow content, phrasing content, palpable content
Permitted content Phrasing content
Tag omission None; both the start and end tags are required
Permitted parents Any element that accepts phrasing content
Implicit ARIA role deletion
DOM interface HTMLElement
Default display inline (with text-decoration: line-through)

Browser support

Supported in every browser.