Syntax | <del>...</del> |
---|---|
Attribute Specifications |
|
Contents | Inline elements, block-level elements |
Contained in | Inline elements, block-level elements |
The del element contains content that has been deleted. This element is useful in marking changes from one version of a document to the next. Through style sheets, authors can suggest an appropriate rendering, such as not displaying the deleted content or rendering the text with a strike-through style.
del may be used as either a block-level element or an inline element. If used as an inline element (e.g., within a p), then del may not contain any block-level elements.
The optional cite attribute of del gives a URI with information on why the content was deleted. A brief explanation for the deletion can be given with the title attribute, which may be rendered as a "tooltip" by some browsers.
The optional datetime attribute specifies the date and time of the deletion. The value is case-sensitive and of the form yyyy-mm-ddthh: mm:sstzd. See the values section for a full explanation of this format.
An example follows:
<del
cite="http://www.w3.org/TR/REC-html40/appendix/changes.html#h-A.1.3"
datetime="1997-12-19T00:00:00-05:00" title="XMP is
obsolete"><p>The XMP element contains
preformatted text in which markup other than an end tag is treated
as literal text.</p></del>
Since del is poorly supported among browsers, authors may wish to use a font style element such as strike (deprecated in XHTML 1.0) to attempt to convey the meaning of del to non-supporting visual browsers. The previous example could also be marked up as follows:
<del
cite="http://www.w3.org/TR/REC-html40/appendix/changes.html#h-A.1.3"
datetime="1997-12-19T00:00:00-05:00" title="XMP is
obsolete"><p><strike>The XMP element is
used for preformatted text in which markup other than an end tag is
treated as literal
text.</strike></p></del>