JavaScript strike()Method
JavaScript String Object
Definition and Usage
The strike() method is used to display a string with a strikethrough.
This method returns the string wrapped in a <strike> tag, as follows:
<strike>string</strike>
Syntax
string.strike()
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the strike() method.
Examples
Examples
Display a string with a strikethrough:
<script>
var str = "Hello world!";
document.write(str.strike());
</script>
var str = "Hello world!";
document.write(str.strike());
</script>
Try it Yourself »
JavaScript String Object
Other Extensions