HTML <del> Tag
<del> tag represents deleted text in an HTML document.
Marking text as deleted is often used for determining differences between multiple versions of the same document. Browsers will typically strike a line through deleted text.
<del> tag is written as
</del> with the deleted text inserted between the start and end tags.
Basic Usage Example - A "To Do" List
<del> tag can be used in a "to do" list to markup items that have been done.
Date & Time
datetime attribute allows you to add a date and (optionally) a time. This attribute is mainly intended for private use (e.g. by server-side scripts collecting statistics about a site's edits), but it could potentially be displayed to users.
Here, we can add date and time information to items that have been crossed off our "to do" list.
You can add a citation using the
cite attribute. The value of this attribute must be the URL of a document that explains the change. This attribute is not intended for readers of the document. Rather, it is intended for private use (e.g. by server-side scripts collecting statistics about a site's edits).
Inserting New Text
Deleted text is often accompanied by inserted text. This often happens when out-dated information needs to be deleted and new information is added. To insert new text, use the
Deleting Table Rows &/or Columns
Delete Table Row
Delete Table Row
Attributes can be added to an HTML element to provide more information about how the element should appear or behave.
<del> element accepts the following attributes.
|Indicates a source that should indicate the reason for the change.|
|Date and time of change.|
The following attributes are standard across all HTML elements. Therefore, you can use these attributes with the
<del> tag , as well as with all other HTML tags.
For a full explanation of these attributes, see HTML 5 global attributes.
Event handler content attributes enable you to invoke a script from within your HTML. The script is invoked when a certain "event" occurs. Each event handler content attribute deals with a different event.
Most event handler content attributes can be used on all HTML elements, but some event handlers have specific rules around when they can be used and which elements they are applicable to.
For more detail, see HTML event handler content attributes.