HTML <s> tag (deprecated)S2C Home   « HTML <s> tag

Definition

The <s> tag is used for making a strike through text style.

Use the <del> tag or preferably the CSS text-decoration property.

Example


<s>Strikethrough text here</s>

Required Attributes

NONE

Optional Attributes

NONE

Common Attributes

class - specifies a classname for the element allowing you to apply the style of the predefined class to the content.


<s class="classname">Strikethrough text here</s>

id - specifies a unique id for the element allowing you to apply the style of the predefined id to the content.


<s id="idname">Strikethrough text here</s>

style - specifies an inline style for the element allowing you to apply the style to the content.


<s style="color:red;text-align:left">Strikethrough text here</s>

title - specifies extra information about the content.


<s title="information about the content">Strikethrough text here</s>

Language Attributes

dir - specifies the directional flow of the content.


<!-- The text will flow from left to right -->
<s dir="ltr">Strikethrough text here</s>

<!-- The text will flow from right to left -->
<s dir="rtl">Strikethrough text here</s>

lang - specifies a language code for the content of the element.


<s lang="en">Strikethrough text here</s>

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

onkeydown - The JavaScript code to be run when an element is in focus and keyboard key is pressed.


<!-- Executes the go() function -->
<s onkeydown="go()">Strikethrough text here</s>

onkeypress - The JavaScript code to be run when an element is in focus and keyboard key is pressed down and released.


<!-- Executes the go() function -->
<s onkeypress="go()">Strikethrough text here</s>

onkeyup - The JavaScript code to be run when an element is in focus and keyboard key is released.


<!-- Executes the go() function -->
<s onkeyup="go()">Strikethrough text here</s>

Mouse Event Attributes

onclick - The JavaScript code to be run when a mouse is clicked on the element.


<!-- Executes the go() function -->
<s onclick="go()">Strikethrough text here</s>

ondblclick - The JavaScript code to be run when a mouse is double clicked on the element.


<!-- Executes the go() function -->
<s ondblclick="go()">Strikethrough text here</s>

onmousedown - The JavaScript code to be run when the mouse button is pressed down while the cursor is over the element.


<!-- Executes the go() function -->
<s onmousedown="go()">Strikethrough text here</s>

onmousemove - The JavaScript code to be run when the mouse button is moved.


<!-- Executes the go() function -->
<s onmousemove="go()">Strikethrough text here</s>

onmouseout - The JavaScript code to be run when the mouse cursor moves off an element.


<!-- Executes the go() function -->
<s onmouseout="go()">Strikethrough text here</s>

onmouseover - The JavaScript code to be run when the mouse cursor moves over an element.


<!-- Executes the go() function -->
<s onmouseover="go()">Strikethrough text here</s>

onmouseup - The JavaScript code to be run when the mouse button is released while the cursor is over the element.


<!-- Executes the go() function -->
<s onmouseup="go()">Strikethrough text here</s>

go to home page Homepage go to top of page Top