<s>

The HTML <s> element denotes text that is no longer relevant or correct, usually shown with a strike through to indicate its inaccuracy or inapplicability.

<s> Tag

The <s> tag is used to mark text as outdated or no longer valid, usually rendering it with a strikethrough. It is often applied to indicate revised or obsolete content.

Syntax

index.html
<s>Strikethrough Text</s>

<s> Demo

Our meeting is scheduled for Monday Tuesday.

index.html
<p>
  Our meeting is scheduled for <s>Monday</s> Tuesday.
</p>

Attributes

This element only includes the global attributes.

Key Points

  • Purpose: The <s> element visually marks text as outdated or incorrect, typically by applying a strikethrough.
  • Difference from <del> and <strike>: Unlike <del>, which denotes deleted content, and the deprecated <strike>, <s> is primarily used for stylistic purposes without implying a specific reason for the change.
  • Styling: By default, browsers render text inside <s> with a line through it.

See Also

  • The deprecated <strike> tag should no longer be used.
  • Use the <del> tag when indicating content removal.
  • The CSS text-decoration-line property can achieve a similar visual effect.

Conclusion

The <s> tag in HTML is used to indicate text that is no longer relevant, typically by applying a strikethrough effect. Unlike the <del> tag, which signifies deleted content, <s> is mainly for visual representation without implying a specific change in content. It is useful for displaying outdated information while keeping it visible, helping users understand that the content is no longer applicable.