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 1102313 of <strike>

  • Revision slug: Web/HTML/Element/strike
  • Revision title: <strike>
  • Revision id: 1102313
  • Created:
  • Creator: bboyle
  • Is current revision? No
  • Comment Add reference to <s> and <del> in summary for inclusion on index https://developer.mozilla.org/en/docs/Web/HTML/Element#Obsolete_and_deprecated_elements

Revision Content

{{ Obsolete_header() }}

Summary

The HTML Strikethrough Element (<strike>) renders text with a strikethrough, or a line through it. This element is obselete in HTML5. Use the {{ HTMLElement("del") }} instead if the element is marking an edit (deleted text), otherwise use a {{ HTMLElement("s") }} element.

Usage Note: As with all purely styling elements, {{ HTMLElement("strike") }} has been deprecated in HTML 4 and XHTML 1, and obsoleted in HTML5. If semantically appropriate, i.e., if it represents deleted content, use the {{ HTMLElement("del") }} instead; in all other cases use a {{ HTMLElement("s") }} element.

Attributes

This element has no other attributes than the global attributes, common to all elements.

DOM interface

This element implements the {{domxref('HTMLElement')}} interface.

Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the {{domxref('HTMLSpanElement')}} interface for this element.

Example

<strike>Today's Special: Salmon</strike> NO LONGER AVAILABLE<br />
<s>Today's Special: Salmon</s> SOLD OUT

Result

Today's Special: Salmon NO LONGER AVAILABLE
Today's Special: Salmon SOLD OUT

See Also

  • The {{ HTMLElement("s") }} element.
  • 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("strike") }} element.
{{ HTMLRef }}

Revision Source

<div>{{ Obsolete_header() }}</div>

<h2 id="Summary">Summary</h2>

<p>The <em>HTML Strikethrough Element</em> (<code>&lt;strike&gt;</code>) renders text with a strikethrough, or a line through it. This element is obselete in HTML5.&nbsp;Use&nbsp;the {{ HTMLElement("del") }}&nbsp;instead if the element is marking an edit (deleted text), otherwise use&nbsp;a {{ HTMLElement("s") }} element.</p>

<div class="note"><strong>Usage Note: </strong>As with all purely styling elements, {{ HTMLElement("strike") }} has been deprecated in HTML 4 and XHTML 1, and obsoleted in HTML5. If semantically appropriate, i.e., if it represents <em>deleted</em> content, use the {{ HTMLElement("del") }} instead; in all other cases use a {{ HTMLElement("s") }} element.</div>

<h2 id="Attributes">Attributes</h2>

<p>This element has no other attributes than the <a href="/en-US/docs/HTML/global_attributes" rel="internal" title="HTML/global attributes">global attributes</a>, common to all elements.</p>

<h2 id="DOM_interface">DOM interface</h2>

<p>This element implements the {{domxref('HTMLElement')}} interface.</p>

<div class="note">
<p><strong>Implementation note: </strong>up to Gecko 1.9.2 inclusive, Firefox implements the {{domxref('HTMLSpanElement')}} interface for this element.</p>
</div>

<h2 id="Example">Example</h2>

<pre class="brush:xml">
&lt;strike&gt;Today's Special: Salmon&lt;/strike&gt; NO LONGER AVAILABLE&lt;br /&gt;
&lt;s&gt;Today's Special: Salmon&lt;/s&gt; SOLD OUT
</pre>

<h3 id="Result">Result</h3>

<p><s>Today's Special: Salmon</s>&nbsp;NO LONGER AVAILABLE<br />
 <s style="text-decoration:line-through">Today's Special: Salmon</s> SOLD OUT</p>

<h2 id="See_Also">See Also</h2>

<ul>
 <li>The {{ HTMLElement("s") }} element.</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("strike") }} element.</li>
</ul>

<div>{{ HTMLRef }}</div>
Revert to this revision