HTML <s> tagS2C Home   « HTML <s> tag

Definition

The <s> tag is used for making a strike through text that is no longer relevant, accurate or correct.

If you wish to mark deletions to some text use the <del> tag which is more appropriate for use in this case.

Example


<p>Mens jeans now only <s>5.99</s>4.99</p>

Mens jeans now only 5.994.99

Attributes

The following attributes can be used with the <s> tag.


<s> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <s> tag.
<s> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<s class="name">Strikethrough Text</s> 
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<s id="name">Strikethrough Text</s> 
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<s style="color:red;">Strikethrough Text</s> 
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<s title="Content info">Strikethrough Text</s> 
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<s accesskey="a">Strikethrough Text</s> 
tabindexSpecifies a tab order for the element.

<s tabindex="1">Strikethrough Text</s> 
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<s dir="ltr">Strikethrough Text</s> 
<!-- The text will flow from right to left -->
<s dir="rtl">Strikethrough Text</s> 
langSpecifies a language code for the content of the element.

<s lang="en">Strikethrough Text</s> 
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<s spellcheck="true">Strikethrough Text</s>  
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<s translate="no">Strikethrough Text</s>  
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<s contenteditable="true">Strikethrough Text</s>  
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<s draggable="true">Strikethrough Text</s> 
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<s hidden>Strikethrough Text</s>  
<s hidden="hidden">Strikethrough Text</s>  
<s> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<s oncopy="go()">Strikethrough Text</s>  
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<s oncut="go()">Strikethrough Text</s> 
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<s onpaste="go()">Strikethrough Text</s> 
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<s ondrag="go()">Strikethrough Text</s> 
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<s ondragend="go()">Strikethrough Text</s> 
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<s ondragenter="go()">Strikethrough Text</s> 
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<s ondragleave="go()">Strikethrough Text</s> 
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<s ondragover="go()">Strikethrough Text</s> 
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<s ondragstart="go()">Strikethrough Text</s> 
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<s ondrop="go()">Strikethrough Text</s> 
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<s onblur="go()">Strikethrough Text</s> 
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<s onchange="go()">Strikethrough Text</s> 
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<s oncontextmenu="go()">Strikethrough Text</s> 
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<s onfocus="go()">Strikethrough Text</s> 
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<s oninput="go()">Strikethrough Text</s> 
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<s oninvalid="go()">Strikethrough Text</s> 
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<s onreset="go()">Strikethrough Text</s> 
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<s onselect="go()">Strikethrough Text</s> 
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<s onsubmit="go()">Strikethrough Text</s> 
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<s onkeydown="go()">Strikethrough Text</s> 
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<s onkeypress="go()">Strikethrough Text</s> 
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<s onkeyup="go()">Strikethrough Text</s> 
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<s onabort="go()">Strikethrough Text</s> 
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<s oncanplay="go()">Strikethrough Text</s> 
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<s oncanplaythrough="go()">Strikethrough Text</s> 
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<s oncuechange="go()">Strikethrough Text</s> 
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<s ondurationchange="go()">Strikethrough Text</s> 
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<s onemptied="go()">Strikethrough Text</s> 
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<s onended="go()">Strikethrough Text</s> 
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<s onloadeddata="go()">Strikethrough Text</s> 
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<s onloadedmetadata="go()">Strikethrough Text</s> 
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<s onloadstart="go()">Strikethrough Text</s> 
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<s onpause="go()">Strikethrough Text</s> 
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<s onplay="go()">Strikethrough Text</s> 
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<s onplaying="go()">Strikethrough Text</s> 
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<s onprogress="go()">Strikethrough Text</s> 
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<s onratechange="go()">Strikethrough Text</s> 
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<s onseeked="go()">Strikethrough Text</s> 
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<s onseeking="go()">Strikethrough Text</s> 
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<s onstalled="go()">Strikethrough Text</s> 
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<s onsuspend="go()">Strikethrough Text</s> 
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<s ontimeupdate="go()">Strikethrough Text</s> 
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<s onvolumechange="go()">Strikethrough Text</s> 
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<s onwaiting="go()">Strikethrough Text</s> 
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<s onclick="go()">Strikethrough Text</s> 
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<s ondblclick="go()">Strikethrough Text</s> 
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<s onmousedown="go()">Strikethrough Text</s> 
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<s onmousemove="go()">Strikethrough Text</s> 
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<s onmouseout="go()">Strikethrough Text</s> >
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<s onmouseover="go()">Strikethrough Text</s> 
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<s onmouseup="go()">Strikethrough Text</s> 
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<s onwheel="go()">Strikethrough Text</s> 
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<s onscroll="go()">Strikethrough Text</s>  
Window - NONE