Spread the love

Today we will learn about HTML <del> Tag and how it is used. Delete tag is used to represent a series of deleted/removed text from a document. It is used as a markup for deleted content. The browser usually renders the line by striking out the deleted text, although this can be changed using the CSS property.

HTML <del> Tag

Example1:-


 <html>  
 <head>  
   <title>HTML Del tag</title>  
 </head>  
 <body>  
   <h1>Example of HTML Del tag</h1>  
   
   <h3>I <del>LOVE</del> YOU </h3>
   <p>I <del>LOVE</del> YOU</p>
  </body>  
</html>  

Output:-

HTML Del Tag with CSS Property

Example2:-


 <html>  
 <head>  
   <title>HTML Del tag</title>  
   <style>
     del{
      background: red;
     }
   </style>
 </head>  
 <body>  
   <h1>Example of HTML Del tag</h1>  
   
   <h3>I <del>LOVE</del> YOU </h3>
   <p>I <del>LOVE</del> YOU</p>
  </body>  
</html>  

Output:-

Note:- To identify the deleted text and inserted text use <ins> tag with <del> which will display deleted and inserted text in a document.

Attributes

cite

datetime


Spread the love

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *