HTML <s> Tag

Beginner
5 min read
Updated: Nov 2026
4 examples
Live preview

Definition and Usage

The <s> element marks text that is no longer relevant or no longer accurate. Browsers usually draw a strikethrough (a line through the text).

Typical uses: sold-out offers, superseded prices, or statements that are outdated but still shown for context. For document edits (removed vs added text), use <del> and <ins> instead (MDN).

Baseline · Widely available.

Not deprecated. Core support has been stable across browsers since about July 2015 (and earlier in practice).

Not for track-changes edits.

Do not use <s> to mean “this was deleted from the document.” Prefer <del> / <ins> for revision markup.

Obsolete sibling: <strike>.

Do not use <strike> in new HTML. Use <s> for outdated content (or CSS text-decoration for pure looks).

HTML Syntax

syntax.html
<s> outdated text</s>

Both start and end tags are required. Content is phrasing content. Parent must accept phrasing content.

Attributes

<s> has no element-specific attributes — only globals. Choose the right element for the meaning:

UseDescriptionTry it
<s>Content is no longer accurate or relevant (still shown for context)Try it
<del>Text removed in a document edit / revisionTry it
<ins>Text added in a document edit / revisionTry it
<strike>Obsolete — do not use; prefer <s>Avoid

Global Attributes

The <s> tag also supports the Global Attributes in HTML.

Live Preview

Compare common <s> patterns and a correct del / ins edit pair.

demo style

A real <s> (or del/ins). Apply a preset, then read the note below.

Preview

There will be a few tickets available at the box office tonight.

SOLD OUT!

Using <s> for text that is no longer accurate.

HTML Examples

Short, copy-ready snippets. Use Try It Yourself for a live editor.

Example 1 — No Longer Accurate

Strike through a claim that is outdated, then state the current fact nearby.

HTML
<p>
  <s>There will be a few tickets available at the box office tonight.</s>
</p>
<p>SOLD OUT!</p>
Try It Yourself

How It Works

  1. Wrap the outdated sentence in <s>.
  2. Keep it visible so readers see what changed.
  3. Add the current status in normal text (here, “SOLD OUT!”).
  4. Browser default: a line through the s text.

Example 2 — Superseded Price

Show an old price as outdated next to the current price.

HTML
<p>
  <s>$29.99</s>
  <strong>$19.99</strong>
</p>
Try It Yourself

How It Works

  1. Mark the old price with <s> — it is no longer the offer.
  2. Show the new price in normal (or emphasized) text.
  3. Keep both readable so shoppers understand the change.
  4. Meaning first: s says “outdated,” not “deleted from the catalog file.”

Example 3 — Prefer del / ins for Edits

When text was removed or added as a revision, use edit elements — not s.

HTML
<p>
  The meeting is on
  <del>Tuesday</del>
  <ins>Wednesday</ins>.
</p>
Try It Yourself

How It Works

  1. Wrap removed wording in <del>.
  2. Wrap added wording in <ins>.
  3. Do not use <s> here — this is an edit, not “no longer accurate content.”
  4. Optional: del / ins can take datetime and cite for edit metadata.

Example 4 — Visual-Only Strikethrough (No s)

If the line is only decoration and the text is still accurate, use CSS — not s.

HTML
<style>
  .strike-look {
    text-decoration: line-through;
  }
</style>

<p>
  <span class="strike-look">Decorative sample</span>
  — text is still accurate; no <code>s</code> needed.
</p>
Try It Yourself

How It Works

  1. Ask: is the text outdated, or only styled?
  2. Outdated / irrelevant → use <s>.
  3. Still accurate, looks only → use CSS text-decoration: line-through.
  4. Document revision → use del / ins.

Edge Cases & Pitfalls

Most mistakes are choosing s when you meant an edit, or a pure visual line.

semantics

Do not fake edits with s

Track changes belong in <del> and <ins>.

obsolete

Skip strike

<strike> is obsolete. Author <s> (or CSS) instead.

a11y

Do not rely on the line alone

Pair outdated text with a clear current status nearby (e.g. “SOLD OUT”) so meaning is not only visual.

ARIA

Implicit role is deletion

MDN notes s maps to the ARIA deletion role. Still prefer del when you mean a real edit.

CSS

Looks can be customized

Override thickness or color with text-decoration — keep the s element when the meaning is “outdated.”

Browser Support

The <s> element is core HTML phrasing content in every modern browser. It is not a Node.js, Deno, or Bun API.

✓ Baseline · Widely available

<s>

Widely available since about July 2015 (and long before). Chrome, Firefox, Safari, Edge, and Opera all render default strikethrough for s.

98% Global support (approx.)
Google Chrome All
Full support
Mozilla Firefox All
Full support
Apple Safari All
Full support
Microsoft Edge All
Full support
Opera All
Full support
Samsung Internet All
Full support
Internet Explorer All
Supported
<s> Widely supported

Bottom line: Safe to use everywhere for outdated content. Use del/ins for edits, and avoid obsolete strike.

Key Takeaways

  • Meaning: <s> = no longer accurate or relevant (usually looks struck through).
  • Edits: use <del> / <ins>, not s.
  • Legacy: skip obsolete <strike>.
  • Looks only: use CSS text-decoration when the text is still true.

One line: use <s> for outdated facts; use del/ins for edits.

Default CSS Settings

Typical user-agent styling for s:

default.css
s {
  text-decoration: line-through;
}

Customize with text-decoration, text-decoration-color, or text-decoration-thickness when needed.

Frequently Asked Questions

The s element marks text that is no longer relevant or no longer accurate. Browsers usually draw a strikethrough (line through the text).
No. For insertions and deletions in a document (track-changes style), use ins and del. Use s only for content that is outdated or superseded, not for edit history.
Both often look similar (strikethrough). del means removed content in an edit; s means the statement is no longer true or useful. Prefer del/ins for revisions.
Visually similar, but strike is obsolete. Use s in modern HTML. Do not author new strike markup.
No. It supports only global attributes such as class, id, and title. Style the look with CSS if you need custom colors or thickness.
No. s is Baseline and widely available. Its meaning is semantic (outdated content), not a pure presentational strike like the obsolete strike element.

Next: samp

Show sample program or system output with the HTML samp element.

samp tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful