Open In App
Related Articles

HTML <del> Tag

Improve Article
Improve
Save Article
Save
Like Article
Like

The <del> tag in HTML stands for delete and is used to mark a portion of text which 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.

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

  • 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.

Syntax:

<del> Contents... </del>

Example 1: Below example illustrate 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: This example use the <del> tag with the datetime attribute.  

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: 
 

Supported Browsers: 

  • Google Chrome 
  • Internet Explorer
  • Firefox 1 and above
  • Opera 
  • Safari 
  • Edge 12 and above
     

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 21 Jul, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials