<del>
del tag
The <del>
element signifies text that has been removed, making it useful for tracking changes or highlighting differences. In contrast, the <ins>
element denotes text that has been added.
Syntax
<del>Text that has been deleted</del>
del
Demo
Our original plan was to meet at the park have dinner at a restaurant.
<p>
Our original plan was to <del>meet at the park</del> have dinner at a restaurant.
</p>
Definition and Usage
The <del>
tag marks text that has been removed from a document. Browsers typically display deleted text with a strikethrough.
<del>
tag encloses the text "meet at the park," indicating that it has been deleted or is no longer relevant.Attributes
This element includes the global attributes.
cite
: A URI linking to a resource that provides context for the change (e.g., meeting minutes).datetime
: Specifies the date and time of the change using a valid date string with optional time. If the string is unparseable, the element will not have a timestamp.
Conclusion
The <del>
element in HTML is used to mark text that has been removed from a document, typically displayed with a strikethrough. It is valuable for tracking changes, revisions, or highlighting differences in content. The element can also include the cite
attribute to provide context and the datetime
attribute to specify when the change occurred. When used alongside the <ins>
element, which indicates added text, it provides a clear way to show updates in documents.
<data>
The HTML <data> element links a machine-readable value to human-readable content, enhancing data processing and accessibility by offering a standardized way to represent data.
<dfn>
The HTML <dfn> element signifies the term being defined in a document, commonly used with definitions to emphasize the described term.