Chapter 5 • Lesson 5.5

Strikethrough: <s>, <del>, and <strike>

Representing no longer accurate content with <s>, editorial document deletions with <del>, retiring obsolete <strike>, and building accessible e-commerce discount pricing.

🎯 Learning Objectives

📖 Mental Model: The Clearance Price Sticker vs The Document Redaction

Imagine two different scenarios where a line is drawn through printed text:

1. The Triad of Strikethrough Tags: Past & Present

HTML has evolved significantly in how it handles strikethrough lines:

Element Status HTML5 Semantic Meaning Attributes
<s> Standard (Active) Represents contents that are no longer accurate or no longer relevant (e.g. superseded sale prices, outdated statements). Global attributes
<del> Standard (Active) Represents an explicit editorial removal from a document as part of a change-tracking record. cite, datetime
<strike> Obsolete / Deprecated Purely presentational in HTML 3.2/4.01. Do not use in modern HTML5. None

2. Accessible E-Commerce Pricing Architecture

A frequent accessibility blunder in e-commerce stores is writing:

<!-- ❌ BAD FOR ACCESSIBILITY --> <p><s>$100.00</s> $79.00</p>

Because screen readers do not announce strikethrough lines by default, a blind user will hear the synthesizer say: "One hundred dollars seventy-nine dollars", with no indication of which number is the active price!

The professional, accessible pattern uses visually hidden helper text (.sr-only):

<!-- ✅ ACCESSIBLE & SEMANTIC --> <p class="price-display"> <span class="sr-only">Original price:</span> <s>$100.00</s> <span class="sr-only">Discounted sale price:</span> <strong class="sale-price">$79.00</strong> </p>

3. Interactive E-Commerce Price Card Lab

Test this production-ready discount product card. Notice how <s> is styled with subdued colors, and the current price is highlighted with semantic <strong>.

SYS: ACTIVE
HULL: 98%
CORE: STABLE
NET: ONLINE
HTML STARSHIP CODE TERMINAL index.html
LIVE RENDER & DIAGNOSTICS CORE TEMP: 45°C
INSPECTING DOM: VALID
TAGS: SCANNING...

🏋️ Hands-On Exercise: Formatting SaaS Pricing & Changelog

  1. In the SaaS pricing tier, strike through the old price "$59/mo" using the semantic <s> element.
  2. Wrap the new promotional price "$39/mo" in a <strong> tag.
  3. In the Release Notes changelog, mark the removed legacy feature "FTP Upload Support" using <del datetime="2026-08-21">.
  4. Click ▶ Run Code to test your changes.
SYS: ACTIVE
HULL: 98%
CORE: STABLE
NET: ONLINE
HTML STARSHIP CODE TERMINAL exercise.html
LIVE RENDER & DIAGNOSTICS CORE TEMP: 45°C
INSPECTING DOM: VALID
TAGS: SCANNING...

⚠️ Pitfall: Using <strike> in New Code

<strike> was deprecated in HTML4 and officially made obsolete in HTML5. Modern linters and validators will flag <strike> as non-compliant. Always use <s> for outdated content or <del> for document revisions.

💡 Pro Tip: Customizing the Strikethrough Line in CSS

You can customize the color and thickness of a strikethrough line independently of the text color using modern CSS text-decoration-color:

s { color: #718096; text-decoration-color: #e53e3e; /* Bright red strike line across gray text */ text-decoration-thickness: 2px; }

📌 Key Takeaways

⭐ LEARN: HTML 🌟 ⚔️ QUIZ BATTLE ARENA // ACTIVE
3x
STREAK!
BONUS ACTIVE
COMBO
? Question 1 / 3

When should you use <s> instead of <del>?

Question 1 / 3 Topic: HTML Fundamentals
14:28 REMAINING
XP REWARD
+250 XP
3x
STREAK!
BONUS ACTIVE
COMBO
? Question 2 / 3

What is the status of the <strike> tag in modern HTML5?

Question 2 / 3 Topic: HTML Fundamentals
14:28 REMAINING
XP REWARD
+250 XP
3x
STREAK!
BONUS ACTIVE
COMBO
? Question 3 / 3

Why is it recommended to include .sr-only helper text when displaying original vs sale prices with <s>?

Question 3 / 3 Topic: HTML Fundamentals
14:28 REMAINING
XP REWARD
+250 XP