s
The s element represents content that is no longer accurate or no longer relevant, displayed with a strikethrough line.
Description
The <s> element renders text with a strikethrough to indicate content that is no longer accurate or relevant, but should not be removed from the document. Unlike <del>, it does not indicate an edit to the document.
Semantic Meaning
The strikethrough element indicates content that's outdated but still visible:
- Content is no longer accurate or relevant
- Does NOT indicate an edit to the document (use
<del>for that) - Screen readers typically don't announce strikethrough styling
- Useful for showing price changes, completed tasks, or outdated info
When to Use
- Price reductions: Show original price crossed out next to sale price
- Completed tasks: Cross off items in a to-do list
- Outdated information: Mark content that's no longer current
- Corrections: Show what was wrong alongside what's correct
- Expired offers: Indicate deals that are no longer available
When NOT to Use
- Document edits: Use
<del>for tracking document changes - Purely decorative: Use CSS
text-decoration: line-throughfor styling only
Variants
Default
Simple strikethrough with muted line color.
This information is outdated.
Live Examples
Price Reduction
Now only $99.99 $79.99!
Sale Pricing
Premium Plan: $29/month $19/month (Save 34%)
To-Do List
Buy groceriesCall dentist- Finish report
- Send email to team
Event Information
Concert: March 15, 2024 POSTPONED - New date: April 20, 2024
Feature Availability
Free tier: 100 API calls/day- Now unlimited!- Pro tier: Priority support
Outdated Information
Our office is located at 123 Old Street 456 New Avenue.
Comparison with del
Note the difference between <s> and <del>:
<s>: No longer relevant (strikethrough only)
<del>: Deleted from document (strikethrough + background)
CSS Properties
| Property | Value |
|---|---|
text-decoration |
line-through |
text-decoration-color |
var(--color-text-muted) |
Accessibility
- Screen readers: Most do NOT announce strikethrough text differently by default
- Visual only: The strikethrough is primarily a visual cue
- Context matters: Ensure surrounding text provides context for why content is struck through
- Don't rely solely on styling: Add text like "was" or "now" for clarity
Improving Accessibility
For critical information, provide text context:
Price: Was $99.99 Now $79.99
Related Elements
<del>- For text that has been deleted from the document (editorial change)<ins>- For text that has been inserted into the document
s vs del: Quick Reference
| Element | Use Case | Example |
|---|---|---|
<s> |
No longer accurate/relevant | Crossed-out prices, completed tasks |
<del> |
Removed from document | Track changes, document revisions |