<s> element
The <s> element represents text that is no longer accurate or no longer relevant. It renders with a strikethrough by default. While it was deprecated in HTML 4, it has been redefined in HTML5 with specific semantic meaning.
This page was last updated on 2025-11-17
Syntax
<s>text no longer accurate</s>
The <s> element is an inline element that requires both opening and closing tags. It can contain text and other inline elements.
Attributes
The <s> element only supports global attributes:
- class - CSS class for styling
- id - Unique identifier
- style - Inline CSS styles
- title - Advisory information (tooltip)
- lang - Language of the content
Examples
Price Changes
<p>Sale price: <s>$50.00</s> <strong>$29.99</strong></p>
Renders as:
Sale price: $50.00 $29.99
Outdated Information
<p>Our store hours are <s>9am-5pm</s> 8am-8pm.</p>
Task Lists
<ul>
<li><s>Buy groceries</s></li>
<li>Call dentist</li>
<li><s>Send email</s></li>
</ul>
When to Use <s>
Use <s> for:
- Text that is no longer accurate or relevant
- Prices that have been reduced
- Information that has been superseded
- Completed items in a to-do list
Don't use <s> for:
- Document edits - use
<del>instead - Legal redactions or corrections - use
<del> - Purely decorative strikethrough - use CSS
text-decoration: line-through
<s> vs <del>
The key difference is semantic:
<s>- Text is no longer accurate but wasn't removed from the document (like old prices)<del>- Text was actually deleted from the document (like edits to an article)
<!-- Price change - use <s> -->
<s>$100</s> $75
<!-- Document edit - use <del> -->
The meeting is on <del>Tuesday</del> <ins>Wednesday</ins>.
Accessibility
Screen readers typically don't announce strikethrough text. For important information, provide additional context:
<p>Price: <s><span class="visually-hidden">Was </span>$50</s>
<span class="visually-hidden">Now </span>$30</p>