From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/element%2Fs.html | 105 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 devdocs/html/element%2Fs.html (limited to 'devdocs/html/element%2Fs.html') diff --git a/devdocs/html/element%2Fs.html b/devdocs/html/element%2Fs.html new file mode 100644 index 00000000..e8eb27ad --- /dev/null +++ b/devdocs/html/element%2Fs.html @@ -0,0 +1,105 @@ +

<s>: The Strikethrough element

The <s> HTML element renders text with a strikethrough, or a line through it. 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.

+

Try it

+
+
Content categories Phrasing content, flow content.
Permitted content +Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts phrasing content.
Implicit ARIA role deletion
Permitted ARIA roles Any
DOM interface HTMLElement
+
+

Attributes

+

This element only includes the global attributes.

+

Examples

+
+
+

css

+
.sold-out {
+  text-decoration: line-through;
+}
+
+
+

html

+
<s>Today's Special: Salmon</s> SOLD OUT<br />
+<span class="sold-out">Today's Special: Salmon</span> SOLD OUT
+
+
+
+

Result

+
+ + +
+

Accessibility concerns

+
+

The presence of the s element is not announced by most screen reading technology in its default configuration. It can be made to be announced by using the CSS content property, along with the ::before and ::after pseudo-elements.

+

css

+
s::before,
+s::after {
+  clip-path: inset(100%);
+  clip: rect(1px, 1px, 1px, 1px);
+  height: 1px;
+  overflow: hidden;
+  position: absolute;
+  white-space: nowrap;
+  width: 1px;
+}
+
+s::before {
+  content: " [start of stricken text] ";
+}
+
+s::after {
+  content: " [end of stricken text] ";
+}
+
+

Some people who use screen readers deliberately disable announcing content that creates extra verbosity. Because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been struck out would adversely affect understanding.

+
+

Specifications

+
+ + +
Specification
HTML Standard
# the-s-element
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
s112
1Before Firefox 4, this element implemented the HTMLSpanElement interface instead of the standard HTMLElement interface.
Yes15≤44.418414≤3.21.0
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s +

+
-- cgit v1.2.3