HTML <strike> Tag

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

Definition and Usage

The <strike> element drew a strikethrough (horizontal line) through its text. It was presentational only — no lasting semantic meaning.

Do not use it in new pages. Prefer <del> when content was removed, and <s> for text that is outdated or no longer relevant (for example, an old price).

Deprecated / Obsolete.

Deprecated in HTML 4 and obsolete in the HTML Living Standard. Avoid in every new project; keep reading only to recognize old markup.

Study-only examples.

Legacy snippets below exist so you can recognize <strike> and replace it. Prefer the <s> / <del> versions.

HTML Syntax

syntax.html
<strike> text</strike>

Historical form only. Prefer one of these modern forms:

prefer.html
<!-- Outdated / irrelevant -->
<s>Today's Special: Salmon</s> SOLD OUT

<!-- Removed from the document -->
<del>Draft paragraph removed later</del>

Attributes

<strike> has no element-specific attributes. Only the global attributes apply (and the element itself is obsolete).

AttributeDescriptionStatus
None specificNo dedicated strikethrough attributes — the tag itself drew the line.Obsolete element

Global Attributes

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

Live Preview

Compare obsolete <strike> with modern <s> and <del>.

Same look often; meaning differs. Prefer s or del in new pages.

Result

Today's Special: Salmon SOLD OUT

Obsolete strike element — study only.

HTML Examples

Short study snippets. Use Try It Yourself for a live editor. Prefer Examples 3 and 4 in real projects.

Example 1 — Basic <strike> (Study Only)

Old pages wrapped text in <strike> to draw a line through it. Do not copy this into new work.

HTML
<p>
  <strike>This feature is no longer available.</strike>
</p>
Try It Yourself

How It Works

  1. Open <strike> around the text to cross out.
  2. Put the phrase inside — browsers draw a line through it.
  3. Close the tag so only that phrase is struck.
  4. Replace later with <s> or <del> based on meaning.

Example 2 — Crossed-out Price (Study Only)

A common legacy pattern: show an old price struck through next to a sale price. Prefer <s> for this today.

HTML
<p>
  Price: <strike>$99.99</strike> $79.99
</p>
Try It Yourself

How It Works

  1. Wrap the old price in <strike> so it looks cancelled.
  2. Keep the new price as normal text next to it.
  3. Know the limit: the tag only changes look, not meaning.
  4. Prefer <s> because the old price is no longer accurate.

Example 3 — Prefer <s> (Irrelevant Text)

Use <s> when text is outdated or no longer relevant — not when it was edited out of a document.

HTML
<p>
  Today's Special: <s>Salmon</s> SOLD OUT
</p>
Try It Yourself

How It Works

  1. Choose <s> for content that is no longer accurate or relevant.
  2. Wrap only that phrase (here, the sold-out special).
  3. Leave surrounding text outside the tag so the sentence still reads clearly.
  4. Skip <strike> — it is obsolete and adds no meaning.

Example 4 — Prefer <del> (Removed Content)

Use <del> when text was deleted from a document (often paired with <ins> for the replacement).

HTML
<p>
  Deadline:
  <del>March 1</del>
  <ins>March 15</ins>
</p>
Try It Yourself

How It Works

  1. Mark removed text with <del>.
  2. Mark the replacement with <ins> when you show both.
  3. Keep order clear: deleted value first, then the new one.
  4. Do not use <strike> for edits — <del> is the semantic choice.

Edge Cases & Pitfalls

Most strike problems come from treating a visual line as enough meaning.

obsolete

Still renders ≠ still allowed

Engines keep limited compatibility for old documents. That does not make <strike> valid in new HTML.

semantics

Pick s or del, not looks

Same line-through style can mean “irrelevant” (<s>) or “removed” (<del>). Choose by meaning.

a11y

Do not rely on the line alone

Some users miss decoration. Add nearby words (like “sold out” or “was”) so the change is clear without the strike.

css

CSS is not a substitute for meaning

text-decoration: line-through can style any element, but when the content is outdated or deleted, prefer <s> or <del>.

nesting

Keep markup simple

Avoid nesting <strike> inside <s> or <del>. One clear semantic tag is enough.

Browser Support

The <strike> element is legacy HTML kept for old pages. It is not a Node.js, Deno, or Bun API.

✓ Deprecated

<strike>

Still rendered in major browsers for backward compatibility, but obsolete for authors. Prefer s or del.

— Do not use in new work
Google Chrome Legacy
Still renders
Mozilla Firefox Legacy
Still renders
Apple Safari Legacy
Still renders
Microsoft Edge Legacy
Still renders
Opera Legacy
Still renders
Samsung Internet Legacy
Still renders
Internet Explorer All
Supported (legacy)
<strike> Obsolete (use s / del)

Bottom line: Recognize strike in old markup, then replace it with s or del. Never ship new pages that depend on it.

Key Takeaways

  • Status: <strike> is obsolete — avoid in new HTML.
  • Replace with: <s> for irrelevant text; <del> for removed content.
  • Look vs meaning: a line through text is not enough — pick the semantic tag.
  • CSS option: text-decoration: line-through styles the line when you already have the right element.

One line: recognize <strike> in old pages; use <s> or <del> in new ones.

Default CSS Settings

User agents typically render <strike> like this (conceptual UA stylesheet):

ua-strike.css
strike {
  text-decoration: line-through;
}

Modern <s> and <del> use the same visual idea, with clearer meaning for authors and tools.

Frequently Asked Questions

The strike element drew a line through text (strikethrough). It was presentational only and is obsolete in modern HTML.
No. It was deprecated in HTML 4 / XHTML 1 and is obsolete in the HTML Living Standard. Do not use it in new pages.
Use del when the text was deleted from a document. In all other cases (outdated, irrelevant, wrong price), use s. Both look similar but carry meaning.
Yes, for backward compatibility with old pages. That does not make strike valid or recommended for new work.
Visually they often look alike. Semantically, s means content that is no longer accurate or relevant; del marks removed content. strike has no modern semantic role.
Yes. text-decoration: line-through (or text-decoration-line: line-through) draws the line. Prefer a semantic tag (s or del) when the meaning matters.

Next: strong

Learn the strong element for important, strongly emphasized text.

strong 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.

12 people found this page helpful