Summary
The HTML Strikethrough Element (<s>
) 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 {{ HTMLElement("del") }} and {{ HTMLElement("ins") }} elements, as appropriate.
Content categories | Phrasing content or flow content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | {{no_tag_omission}} |
Permitted parent elements | Any element that accepts phrasing content. |
DOM interface | {{domxref("HTMLElement")}} |
Attributes
This element only includes the global attributes.
DOM interface
This element implements the HTMLElement
interface.
Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the
HTMLSpanElement
interface for this element.Example
<s>Today's Special: Salmon</s> SOLD OUT<br> <span style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT
Result
Today's Special: Salmon SOLD OUT
Today's Special: Salmon SOLD OUT
See Also
- The {{ HTMLElement("strike") }} element, alter ego of the {{ HTMLElement("s") }} element is obsolete and should not be used on Web sites any more.
- The {{ HTMLElement("del") }} element is to be used instead if the data has been deleted.
- The CSS {{ cssxref("text-decoration") }}-line-through property is to be used to achieve the former visual aspect of the {{ HTMLElement("s") }} element.
{{ HTMLRef }}