HTML <del> Tag
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:
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 >w3wiki</ h1 > < h2 >HTML del Tag</ h2 > <!-- HTML del tag is used in paragraph Tag --> < p > w3wiki 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 >w3wiki</ h1 > < h2 >HTML del Tag</ h2 > < p > w3wiki 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
Contact Us