s element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The s element represents content that is no longer accurate or relevant. This element can become useful when the author needs to make evident a change in prices, vacancies, policies, etc.

Browsers usually render the contents of the s element as strike-through text. This is, normal text striked with a horizontal line.

HTML5 has reinstated this element, which was deprecated in HTML 4.01 because of its presentational nature. It's new purpose is to mark up content that stopped being acurate or relevant.

The s element is designed for general changes and shouldn't be used to mark up editorial changes made in the document. For such purpose, the del element is more appropriate.

Examples

The first example shows an offer in an e-commerce website. There, the old price (from before the sale price has been applied) is marked with s to let the users see that the price has been lowered.

<h1>Portable Digital AM/FM Radio</h1>
<p>Digital AM/FM radio with 20 station presets; weather band reception; LCD display with clock; battery indicator; uses 1 AAA battery (not included); includes headphones and belt clip.</p>
<p><s>$49,99 - Free shipping!</s></p>
<p>Now $39,99 - Free shipping!</p>

Portable Digital AM/FM Radio

Digital AM/FM radio with 20 station presets; weather band reception; LCD display with clock; battery indicator; uses 1 AAA battery (not included); includes headphones and belt clip.

$49,99 - Free shipping!

Now $39,99 - Free shipping!

The second example shows again a product for sale. This time the s element is used to show the previously available quantity for the now sold out item. Is easy to imagine how convinient it could be for the author to show this product is regularly available or highly desirable.

<h1>Dedicated server SS1</h1>
<p>8 GB RAM, 6 Cores, 120 GB SSD and 250 GB bandwidth for just $99!</p>
<p><s>6 servers remaining</s></p>
<p>Sold out! Will be replenished.</p>

Dedicated server SS1

8 GB RAM, 6 Cores, 120 GB SSD and 250 GB bandwidth for just $99!

6 servers remaining

Sold out! Will be replenished.

Attributes

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.