How to Apply Strikethrough in HTML?
For applying the strikethrough to your text in HTML, you can use any of the following two methods:
Method 1: Using the HTML “del” Tag
This method makes use of the “del” tag in HTML for applying the strikethrough to the specified text. The HTML script designed for doing this is shown in the following image:
In this HTML script, we want to display a sentence inside the paragraph tag. Inside this sentence, we want to replace one word with another, in a way that we strikethrough the word to be replaced and underline the replaced word. For that, we mentioned the word to be replaced inside the “del” tag and the replaced word inside the “ins” tag.
The result of this HTML script is shown in the following web page:
Method #2: Using the HTML “s” Tag
In this example, we want to provide you with an alternate method of applying the strikethrough to your text. For that, you will have to use the HTML script shown in the following image:
In this script, we wrote the text that we wanted to strikethrough inside the “s” tag of the HTML. This was followed by another message that we wanted to display instead of the cancelled-out text.
The output of this HTML script is shown in the following web page:
This article was written to explain the usage of the strikethrough tag in HTML. We shared the two different methods of applying this tag to your desired text in HTML. You can choose these methods according to your personal preference. You can use this tag very easily in HTML.