In this article, we will see what is HTML del tag and how to use it with examples. You can use the <del> tag to delete a word and the <ins> tag to insert a word.
For real-time example: An employee sends some content to a manager for verification. The manager modifies the content and sends it again to the employee. Now if we want to see the content before modification and after modification, we need to use these two tags. We can also achieve this in Microsoft word. Let’s see an example code:
Example of del tag
<p>He asked her <del>contact</del> <ins>whatsapp</ins> number.</p>
- In the above code, we have created a <p> tag<p> tag and put some sentences inside it.
- If you want to change the word ‘Contact’ to ‘WhatsApp’, you need to put ‘Contact’ in the <del> tag and ‘WhatsApp’ in the <ins> tag.
- See the above code, the sentence before and after modification is displayed successfully.
We can not use the <del> tag without the <ins> tag, if we do that, the sentences won’t meaningful.
So if we use only the del tag then it will delete only. Consider the above example, If we don’t use the ins tag, the output will be “He asked her number”.