HTML <del> Tag
Description
The <del>
HTML tag is used to mark and display text that has been deleted or removed from a document or webpage. It is typically used in conjunction with the <ins>
tag, which represents inserted or added text. When used, the <del>
tag renders the enclosed text with a strikethrough line, visually indicating that this content has been deleted. This tag is particularly useful in situations where you want to show changes or revisions in a document, such as in collaborative editing or version history displays.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Any block, inline and text (but cannot contain block content when used as an inline element)
- Start/End Tags
- Start tag: required, End tag: required
Example
<p>My favorite color is <del>blue</del> <ins>green</ins>!</p>
Attributes
Attribute | Definition |
---|---|
cite | Specifies a URL to a document which explains why the text was deleted. |
datetime | Specifies the date and time when the text was deleted. |
Global Attributes
The <del>
tag also supports the Global Attributes in HTML5
Event Attributes
The <del>
tag also supports the Event Attributes in HTML5
Browser Support
The following table will show you the current browser support for the HTML <del>
tag.
Desktop | |||||
12 | 1 | 1 | 15 | 4 |
Tablets / Mobile | |||||
18 | 4 | 14 | 3.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th March 2024