HTML5 Reference

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

Relevant HTML Tutorials

HTML Lessons - Inline Semantics