<strike>

The HTML <strike> element, now deprecated, was intended to show text with a strikethrough effect to indicate irrelevance; modern practices use CSS to achieve similar visual outcomes.

<strike> Tag

The <strike> tag was originally used to show text with a strikethrough but is now deprecated. Instead, use the <del> or <s> tags for better semantic meaning.

  • <del>: Indicates deleted content.
  • <s>: Represents text that is no longer accurate or relevant.

Syntax

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

Modern Alternative with <s>

This is outdated information.

index.html
<p>
  This is <s>outdated</s> information.
</p>

Example with <del>

The del element

My favorite color is blue red!

index.html
<h1>The del element</h1>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>

Key Points

  • Avoid using <strike>; opt for <s> for stylistic strikethroughs or <del> for removed content.
  • Both <s> and <del> provide strikethrough effects but serve different purposes.

See Also

  • Use <s> for indicating outdated text.
  • Use <del> for deleted or replaced content.
  • The CSS text-decoration property can be used to achieve similar styling effects.

Conclusion

The <strike> tag is deprecated and should be replaced with <del> or <s>. The <del> tag marks removed content, while <s> is used for outdated or irrelevant text. Both tags help maintain proper semantics while providing the same visual effect.