👀 Live Preview
Old price struck through next to the new price:
The old price new price is $19.99.

The <s> tag marks text that is no longer accurate or relevant. This guide covers syntax, styling, comparisons with del, pairing with ins, and best practices for beginners.
No longer valid.
Visual line-through.
Semantic difference.
Document changes.
Color and class.
Meaningful markup.
<s> Tag?The <s> tag is a semantic HTML element used to represent text that is no longer accurate or relevant. It visually strikes through content to show users that the information is outdated or no longer valid.
Use s for outdated prices, deprecated features, or superseded facts. For document edits, use del instead.
Do not use the obsolete <strike> or <strike-through> elements. The modern replacement is <s> for irrelevant content or <del> for removed text.
Wrap the text you want to strike through between opening <s> and closing </s> tags:
<s>Outdated Information</s>s inline inside paragraphs and other text content.class and style for custom appearance.ins when showing replacements side by side.del when marking text removed during document revision.| Topic | Code Snippet | Notes |
|---|---|---|
| Basic strikethrough | <s>text</s> | Inline element |
| Styled | style="color: red" | Global attr |
| With replacement | <ins>...</ins> <s>...</s> | Change docs |
| Document removal | Use del | Not s |
| Obsolete tag | strike | Do not use |
| Browser support | Universal | All browsers |
<s> vs <del>| Element | Meaning | Best for |
|---|---|---|
<s> | No longer relevant or accurate | Old prices, outdated facts |
<del> | Removed from the document | Edit history, track changes |
<ins> | Added to the document | New content in revisions |
The <s> tag has no tag-specific attributes. Combine it with global attributes or CSS for a customized appearance.
<s style="color: red;">Deprecated Feature</s>class CSSApply a class for reusable strikethrough styling.
class="outdated"style InlineInline color or text-decoration overrides.
style="color: red"title TooltipExplain why the text is struck through.
title="Discontinued"Strike through outdated text and pair s with ins to document changes.
Old price struck through next to the new price:
The old price new price is $19.99.
The <s> tag visually strikes through text that is no longer accurate or relevant.
The primary purpose of s is to strike through text that is outdated or no longer valid.
<p>The <s>old price</s> new price is $19.99.</p>Use s with ins to highlight additions and outdated content within a document.
<p><ins>New content</ins> <s>Old content</s></p>title to explain why text is struck through.del and s with different semantic roles.Place no-longer-relevant words inside s tags.
Default styles render a strikethrough line across the text.
Surrounding normal text shows the current, accurate information.
Users instantly see what information has been superseded.
The <s> tag is supported in all major browsers, including Internet Explorer.
All browsers render <s> with a line-through text decoration.
Bottom line: Use <s> confidently for outdated text in any browser.
Effectively using the <s> tag is valuable for web developers looking to convey changes or mark outdated information. By implementing this tag judiciously, you can enhance the clarity of your content and provide a better user experience.
s for outdated or irrelevant informationins to document changess for purely decorative strikethroughstrike instead of ss with del for edit tracking<s>Bookmark these before you strike through text.
No longer valid.
MeaningDefault style.
VisualDifferent role.
SemanticsTrack changes.
Patternclass / style.
CSSAll browsers.
Compatibilitys means no longer relevant. del means removed from the document during editing.class and style apply.ins for new content with s for outdated content.Practice <s> for strikethrough and change documentation in the Try It editor.
6 people found this page helpful