`<s>` HTML strikethrough element
The <s> HTML element renders 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 <s> HTML element renders 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.
tabbed-shorter
```html interactive-example
There will be a few tickets available at the box office tonight.
SOLD OUT!
```css interactive-example
s {
/* Add your styles here */
}
Attributes
This element only includes the global attributes.
Examples
.sold-out {
text-decoration: line-through;
}
<s>Today's Special: Salmon</s> SOLD OUT<br />
<span class="sold-out">Today's Special: Salmon</span> SOLD OUT
Result
Examples
Technical summary
| Content categories | Phrasing content, flow content. |
|---|---|
| Permitted content | Phrasing content. |
| Tag omission | None, both the starting and ending tag are mandatory. |
| Permitted parents | Any element that accepts phrasing content. |
| Implicit ARIA role |
deletion
|
| Permitted ARIA roles | Any |
| DOM interface | HTMLElement |
Specifications
Browser compatibility
See also
- The strike element, alter ego of the
<s>element, is obsolete and should not be used on websites anymore. - The del element is to be used instead if the data has been deleted.
- The CSS text-decoration-line property is to be used to achieve the former visual aspect of the
<s>element.