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

Definition

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

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

Example


<strike>This text will be strikethrough text.</strike>

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.


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

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


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

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


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

title - specifies extra information about the content.


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

Language Attributes

dir - specifies the directional flow of the content.


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

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

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


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

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 -->
<strike onkeydown="go()">Strikethrough text here</strike>

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 -->
<strike onkeypress="go()">Strikethrough text here</strike>

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


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

Mouse Event Attributes

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


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

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


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

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 -->
<strike onmousedown="go()">Strikethrough text here</strike>

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


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

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


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

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


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

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


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

go to home page Homepage go to top of page Top