del
Summary
The del element indicates text that has been deleted from the document.
Overview Table
Besides the global attributes the following attributes are supported:
- cite
- The cite attribute may be used to specify the address of a document that explains the change. When that document is long (e.g. the minutes of a meeting) authors are encouraged to include a fragment identifier pointing to the specific part of that document that discusses the change.
datetime - The datetime attribute may be used to specify the time and date of the change. If present, it must be a valid date string with optional time.
Examples
This example uses the <del>
' element to mark deleted text.
<p>This text existed in the document when it
was written and persists. <del datetime="1997-10-01T12:15:30-05:00">This text was deleted on 1 October 1997.</del></p>
This example uses <ins>
and <del>
elements to explain changes in a document
<p>I <del>am</del><ins>was</ins> on vacation in <del>France</del><ins>Italy</ins>.</p>
<p>
<del>It is supposed to be sunny and hot.</del>
<ins>It rained in France so we decided to go to Italy instead.</ins>
</p>
Usage
The default behavior of the del element is as a phrasing-level element, but it can be wrapped around any element within the body.
Notes
The default browser display of del is struck-through (with a line through the vertical middle of the text).
If you want to strike-through text, but the word or phrase in question is not a deletion, you should use the CSS rule text-decoration: strikethrough on the appropriate element enclosing the text.
While s and del appear to perform the same function—marking obsolete content—they differ in semantics. The del element marks text that has been removed from the document, but s marks text that is to be kept in the document, but is no longer accurate.
For Internet Explorer 8 and later the value of the cite attribute depends on the current document compatibility mode.
Related specifications
See also
Related articles
HTML
del
Text
del
External resources
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]