Skip to content
Related Articles

Related Articles

Improve Article

HTML <del> Tag

  • Difficulty Level : Basic
  • Last Updated : 02 Mar, 2021

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
  • Opera
  • Safari

 

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.




My Personal Notes arrow_drop_up
Recommended Articles
Page :