HTML <del> Element
The <del> tag is used to define text that has been deleted or removed from a document. When a text is enclosed within the <del> tag, the text will be displayed with a strikethrough. This is commonly used to show changes or corrections made to a document.
Example:
Original text: This is some deleted text.
Here is the code snippet to achieve the above result:
<del>This is some deleted text.</del>
Attributes of the <del> Tag:
| Attribute | Description |
|---|---|
| cite | Specifies a URL to a document that explains why the text was removed |
| datetime | Specifies the date and time when the text was deleted |
Examples with Attributes:
Original text: This is some deleted text with citation and datetime.
Here is the code snippet to achieve the above result with attributes:
<del cite="https://www.example.com" datetime="2022-01-01">This is some deleted text with citation and datetime.</del>