| Depr. | Empty | Version |
|---|---|---|
| No | No | HTML 4 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Partial | Partial | Partial | Partial | Partial |
Syntax
Description
The
del element is used to indicate a change that saw the
author delete content which appeared in an earlier version of a
document.
del can be used to identify
any removed content, from a specific word or phrase that’s been removed
(in which case the del is deemed to be an inline
element) to an entire block of content, which could include a number of
nested block-level elements (in this case, the del is
deemed to be a block-level element).
The del element has a counterpart in the
ins element, which is used to
identify an insertion of content into a document.
Both elements have optional attributes that provide extra
information about the change that has been made to the document, namely
the cite and datetime
attributes.
The example code above would render on screen as shown in Figure 1.
del element in action
Whether a del element is
determined to be inline or block level depends on the context in which
it’s used. If the del is an immediate child of
body (with a Strict Doctypes declaration), it’s a block-level
element. If it’s a child of a p element, it’s deemed
to be an inline element.
Note that a
del element can’t contain block-level child elements
when it’s used in a context that would make it inline (for example, a
del contained in a p can’t contain a
block-level element).
Example
The following text was hastily revised, yet the author chose to identify what was changed:
<p>Bernie enjoyed nothing more than a <del
datetime="2007-11-05T23:31:05Z">night out on the town at his
favorite drag queen show</del> <ins
datetime="2007-11-05T23:33:32Z">quiet night in with a warm cup of
cocoa.</ins></p>
Use This For …
This element can be used for inline text content, or blocks of content.
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial | Partial |
The
del element has good browser support; all the major
browsers render deleted text with a strikethrough.
The browser
support charts show partial rather than full support, because of the lack
of obvious support for the element-specific attributes
(cite and
datetime).
User-contributed notes
There are no comments yet.