<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
Example
#<p>
React course:
<s>$249</s>
<strong>$149</strong>
</p>
<p><s>Paper certificate</s> We now issue certificates only as a PDF.</p>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
#<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:
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
#- <del>Text removed from a document, shown struck through to preserve the history of changes.
- <ins>Text added to a document, for example in a new version of a terms page or a corrected article.
- <u>Text with an annotation that can’t be expressed in words, most often a spelling-error mark.
- <small>Fine print: disclaimers, legal notices, copyright, and short side notes.
- <mark>Highlights a piece of text like a highlighter, because it’s relevant in the current context.
Spotted a mistake or missing an example? Write to us.