<s>
<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
<s>Strikethrough Text</s>
<s>
Demo
Our meeting is scheduled for Monday Tuesday.
<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.
<ruby>
The HTML <ruby> element creates a ruby annotation, offering supplementary text like pronunciation or translation above or beside East Asian characters to facilitate reading.
<samp>
The HTML <samp> element is used to indicate sample output from a computer program or system, typically shown in a monospace font to represent code or results from commands.