HTML <s> Tag Tutorial - Usage, Syntax,
Attributes and Example

calender-iconPublished: 15 May 2025

clock-icon5-min read





INTRODUCTION

The HTML <s> element is used to show text with strikethrough or a line through it. It is used for text that is no longer relevant or no longer accurate. The <s> element is not used to show text edits, for that <del> and <ins> element are used.

The <s> element should not be used to merely strikethrough the text. For this you can use the CSS text-decoration-line property with value set to line-through to achieve same visual aspect.

The <strike> element, a former counterpart of the HTML <s> element, is now obsolete and should no longer be used on websites.

Syntax:
<s> - TEXT - </s>

Example:

<p> 
Ticket Availability: <s> The Tickets for World Cup is available.  </s> 
Sold Out!.
</p>

Output:

Ticket Availability: The Tickets for World Cup is available.
Sold Out!



Tag Omission

The HTML <s> element must have both start tag and end tag.

ATTRIBUTES

The <s> element only has global attributes.

Frequently Asked Questions (FAQ)

What is the Difference Between HTML s Tag and HTML del tag?
The HTML del tag indicates that content has been removed from the document, regardless of whether it remains visible or is hidden using CSS. It represents an actual edit to the document. In contrast, the HTML s tag signifies that the content is no longer relevant or no longer accurate.

What is the purpose of the <s> element in HTML?
The HTML <s> element is used to show text with strikethrough or a line through it. It is used for text that is no longer relevant or no longer accurate.

Can CSS be used to style the <s> element differently?
Yes, CSS can be applied to the <s> element to customize its appearance beyond the default strikethrough.

What is the difference between HTML <s> element and <strike> element?
The <strike> element is deprecated and should not be used. Instead, use the <s> element to indicate content that is no longer accurate or relevant.