A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/html/elements/s below:

s – strikethrough · WebPlatform Docs

s – strikethrough s

For technical reasons, the title of this article is not the text used to call this API. Instead, use s

Summary

The s element represents contents that are no longer accurate and must be marked accordingly in order to allow keeping it in the document.

Overview Table
DOM Interface
HTMLElement

Use the s element to represent things that are no longer relevant or no longer accurate. However, s is not appropriate when indicating document edits; for that, use the del and ins elements, as appropriate.

Examples

This example uses the <s> element to render a text that no longer accurate.

<ul>
  <li><s>today's special: Gouda Cheeseburger, .14</s> SOLD OUT</li>
  <li>Classic Cheeseburger, .50</li>
</ul>

View live example

Typical browser default CSS properties for the <s> element.

text-decoration: line-through;
Usage
 While s and del appear to be similar, namely marking obsolete content, but they differ in semantics. del marks text that has been removed from the document, but s marks text that is to be kept in the document, but made clear that its content is no longer accurate.
Notes

The information that the text inside the s element is not accurate is not indicated to assistive technologies, like screen readers. Instead it is interpreted like regular text which can lead to confusion. Add clear text that the information is invalid.

Related specifications
HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation
HTML 4.01
W3C Recommendation
See also Other articles External resources Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4