s
The HTML <s> element marks content that is no longer accurate, valid, or relevant. It is different from <del>, which represents content removed as part of a document edit.
What you will learn
- What it means when content is marked with
s - How
sdiffers fromdel - When CSS is enough for a purely visual strike-through
Basic example
<p>This offer is <s>valid until Friday</s> no longer available.</p>
The old wording is shown as no longer valid, but it is not necessarily a record of a document edit. This makes s useful for outdated prices, discontinued products, or superseded information.
s and del
s: the content is no longer accurate or relevant.del: the content was removed from the document as part of a change.
If a strike-through is only a visual design choice, use CSS instead. Choose the element according to the information you want to communicate.