HTML <del> tag


HTML <del> tag is used to represent the range of text that has been deleted/removed from the document. It is used as a Markup for the deleted content. The browser generally renders it by strike a line through the deleted text, although this can be changed using the CSS property.

Syntax:

<del> Content........</del>  

Following are some specifications about the HTML <del> tag

DisplayInline
Start tag/End tagBoth Start and End tag
UsageTextual

Example 1:

<!DOCTYPE html>  
<html>  
<head>  
<title>Del tag</title>  
</head>  
<body>  
<h2>Example of Del Tag</h2>  
<p>It represent the <del> deleted </del> text. </p>  
</body>  
</html>  

Output:

HTML del tag

Example 2

Using CSS and <ins> tag

<!DOCTYPE html>  
<html>  
<head>  
<title>Del tag</title>  
<style>  
    del{  
        color: red;  
        background-color: #fde1e5;}  
   ins{  
       color:#16c39a;}  
</style>  
</head>  
<body>  
<h2>Example of Del Tag</h2>  
<p>Rishi came to Rahul's palce to <del>shock </del> <ins> surprise </ins> him</p>  
</body>  
</html>  

Output:

HTML del tag

Attribute

AttributeValueDescription
citeURLIt specifies a URL of the resource which explains change or reason of deleting text.
datetimeYYYY-MM-DDThh:mm:ssTZDIt specifies the date and time when text is deleted.

Global Attribute

HTML <del> tag supports the Global attributes.

Event Attribute

HTML <del> tag supports the Event attributes.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<del>YesYesYesYesYes

Leave a Reply

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