Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / HTML

s — content that is no longer accurate or relevant

The `s` element marks content that is no longer accurate or relevant, such as a previous price. It does not mark deletions made while editing a document; use `del` for that purpose.

Version: WHATWG HTML Living Standard; index snapshot date recorded separately

Syntax

<s>…</s>

The s element keeps text in the document while marking it as no longer accurate or relevant. A typical use is a previous price retained beside the current price. Choose this element for the meaning of the content, not merely to obtain a particular appearance.

Distinguish outdated information from an editorial change: s means that information has lost its accuracy or relevance, whereas del marks text removed from a document as an edit. These elements are not interchangeable.

The element belongs to the flow content, phrasing content, and palpable content categories. It can appear where phrasing content is expected, and its contents must also be phrasing content. In text/html syntax, both the opening and closing tags are required. It supports global attributes and uses the HTMLElement interface.

In the example, only 30 USD is marked as outdated; 24 USD remains the current price. The output field shows plain text without visual decoration. An isolated browser check confirmed that the text of the body element matches the stated output. The check did not cover the DOM structure. To inspect that structure yourself, save the example as an HTML file and open it in a browser.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Updated price</title>
<p>Previous price: <s>30 USD</s>. Current price: 24 USD.</p>
</html>

Result

Previous price: 30 USD. Current price: 24 USD.

In an isolated Chromium instance with external requests blocked, the text of the `body` element in this example matched the stated output. The DOM structure was not checked.

Sources