HTML <s> Element

The HTML <s> element represents text that is no longer accurate, relevant, or applicable while allowing the original information to remain visible.

Syntax

<p>Regular price: <s>$49.95</s> Sale price: $39.95</p>

The <s> element requires both an opening and closing tag. Browsers normally display its contents with a line through the text.

Attributes

The <s> element supports the global HTML attributes. It does not have any element-specific attributes.

Example

This example uses the <s> element to show an original price that is no longer current while keeping the previous price visible.

Play in Editor

Usage Notes

Use the <s> element when information was previously applicable but is no longer accurate or relevant. A common example is displaying an original price next to a current sale price.

The <s> element should not be used simply because you want text to have a line through it. If the line-through effect is purely visual and has no semantic meaning, use CSS with the text-decoration property instead.

Do not use <s> to identify edits or deletions made to a document. Use the <del> element when text has been removed from a document and the deletion itself is meaningful.

The browser's default strikethrough appearance can be changed with CSS while retaining the meaning provided by the <s> element.

Accessibility

Do not rely on the visual line through the text as the only indication that information is no longer current. Some assistive technologies may not announce the strikethrough styling or the semantic meaning of the <s> element.

When the change is important, provide surrounding text that makes the meaning clear. For example, labels such as Regular price and Sale price allow users to understand the price change even if the strikethrough is not perceived.

Browser Support

Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.

For detailed browser compatibility information, see Can I Use: HTML <s> Element .

The <s> element is related to the <del> element for deleted content and the <ins> element for content that has been added to a document.

Specifications

HTML Living Standard: The <s> Element