Open In App

HTML <del> Tag

Last Updated : 29 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

HTML <del> Tag is used to mark a portion of text that has been deleted from the document. The deleted text is rendered as strike-through text by the web browsers although this property can be changed using CSS text-decoration property. The <del> tag requires a starting and ending tag.

Syntax

<del attr="values"> Contents... </del>

Attributes

The <del> tag contains two attributes which are described below:

Attributes

Description

cite

It is used to specify the URL of the document or message which denotes the reason for deleting the text.

datetime

It is used to specify the date and time of the deleted text.

Supported Attributes

This Tag supprts the Global attribute & the Event Attibute.

Example 1: Illustration of the <del> element in HTML

HTML




<!DOCTYPE html>
<html>
 
<body>
    <h1>GeeksforGeeks</h1>
    <h2>HTML del Tag</h2>
     
    <!-- HTML del tag is used in paragraph Tag -->
    <p>
        GeeksforGeeks is a
        <del>mathematical</del>
        science portal
    </p>
</body>
 
</html>


Output:

Example 2: Use of the <del> tag with the datetime attribute.  

HTML




<!DOCTYPE html>
<html>
 
<body>
    <h1>GeeksforGeeks</h1>
    <h2>HTML del Tag</h2>
 
    <p>
        GeeksforGeeks is a
        <del datetime="2024-01-03T12:00:00Z">
            mathematical
        </del>
        science portal
    </p>
</body>
 
</html>


Output: 
 

Supported Browsers 

  • Google Chrome 1
  • Firefox 1
  • Opera 15
  • Safari 4
  • Edge 12
     


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads