Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 493761 of <s>

  • Revision slug: Web/HTML/Element/s
  • Revision title: <s>
  • Revision id: 493761
  • Created:
  • Creator: kscarfone
  • Is current revision? No
  • Comment Updated tags

Revision Content

Summary

The HTML Strikethrough Element (<s>) 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 {{ HTMLElement("del") }} and {{ HTMLElement("ins") }} elements, as appropriate.

Attributes

This element only includes the global attributes.

DOM interface

This element implements the HTMLElement interface.

Implementation note: Up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

Example

<s>Today's Special: Salmon</s> SOLD OUT<br />
<span style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT

Result

Today's Special: Salmon SOLD OUT
Today's Special: Salmon SOLD OUT

See Also

  • The {{ HTMLElement("strike") }} element, alter ego of the {{ HTMLElement("s") }} element is obsolete and should not be used on Web sites any more.
  • The {{ HTMLElement("del") }} element is to be used instead if the data has been deleted.
  • The CSS {{ cssxref("text-decoration") }} property is to be used to achieve the former visual aspect of the {{ HTMLElement("s") }} element.
{{ HTMLRef }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>The <em>HTML Strikethrough Element</em> (<code>&lt;s&gt;</code>) renders text with a strikethrough, or a line through it. Use the <code>&lt;s&gt;</code> element to represent things that are no longer relevant or no longer accurate. However, <code>&lt;s&gt;</code> is not appropriate when indicating document edits; for that, use the {{ HTMLElement("del") }} and {{ HTMLElement("ins") }} elements, as appropriate.</p>
<h2 id="Attributes">Attributes</h2>
<p><span style="line-height: 21px;">This element only includes the&nbsp;</span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">global attributes</a><span style="line-height: 21px;">.</span></p>
<h2 id="DOM_interface">DOM interface</h2>
<p>This element implements the <code><a href="/en-US/docs/DOM/element" title="DOM/element">HTMLElement</a></code> interface.</p>
<div class="note">
 <strong>Implementation note: </strong>Up to Gecko 1.9.2 inclusive, Firefox implements the <a href="/en-US/docs/DOM/span" title="DOM/span"><code>HTMLSpanElement</code></a> interface for this element.</div>
<h2 id="Example">Example</h2>
<pre class="brush:xml">
&lt;s&gt;Today's Special: Salmon&lt;/s&gt; SOLD OUT&lt;br /&gt;
&lt;span style="text-decoration:line-through;"&gt;Today's Special: Salmon&lt;/span&gt; SOLD OUT</pre>
<h3 id="Result">Result</h3>
<p><strike>Today's Special: Salmon</strike> SOLD OUT<br />
 <span style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT</p>
<h2 id="See_Also">See Also</h2>
<ul>
 <li>The {{ HTMLElement("strike") }} element, alter ego of the {{ HTMLElement("s") }} element is obsolete and should not be used on Web sites any more.</li>
 <li>The {{ HTMLElement("del") }} element is to be used instead if the data has been <em>deleted</em>.</li>
 <li>The CSS {{ cssxref("text-decoration") }} property is to be used to achieve the former visual aspect of the {{ HTMLElement("s") }} element.</li>
</ul>
<div>
 {{ HTMLRef }}</div>
Revert to this revision