The <del> tag in HTML is used to display the deleted text, which would strike a line on that specific text/texts.

Following are the attributes of the <del> tag −

  • cite − A URL that would tell why the text was deleted
  • datetime − The date and time when the text was deleted.

Let us now see an example to implement the <del> element in HTML −


 Live Demo

<!DOCTYPE html>
<h2>Player Details with Reporting Time</h2>
<p>These are the <ins>details with reporting time</ins></p>
   <legend>New Details −</legend>
   Player − <input type="text"><br>
   Rank − <input type="number"><br>
   Email − <input type="email"><br>
   Reporting Time − <input type="time">
<p><del>All data captured before the World Cup.<del></p>

This will produce the following output displaying a strike text, since we have deleted that entire line −

In the above example, we have deleted a text using the <del> elements −

All data captured before the World Cup.

Now, you can see the striked text.