del Element


 

Module

The del element is declared by the XHTML 1.1 Edit Module

Elements in the Edit Module are:
ins | del

Description

The del element is used to indicate content which has been deleted from the document since the last version. See also the ins element.

The cite attribute may be used to provide a URI which gives the reason for the change and the datetime attribute may be used to indicate the date and time of the change. A title attribute may also be added to provide a brief reason for the deletion. No browser of which I am aware automatically presents the value of either the cite or the datetime attribute to the user. This means that, to obtain this information, the user must either view the document's source code or use browser-specific methods of retrieving the data - for example, in certain browsers (e.g. Firefox) right-clicking over the element and selecting Properties will bring up this information. Alternatively, scripting may be used to render this content on the page.

del and ins are not routinely used on web pages but are useful in specific circumstances, such as for draft specifications or legal documents, where it is necessary to be able to tell at a glance what has changed since the previous version of the document (and possibly also when and why).

Examples:

  • <del cite="changes/why-del-sec13.html" title="Section removed on advice of Mr Smith">
      <div class="section">
      <h3>Section 13</h3><p>This section is concerned with...</p>
      </div>
    </del>
  • as stated in Section <del datetime="2006-05-28">11.2</del><ins datetime="2006-05-28">12.2</ins>

These examples render as:

  • Section 13

    This section is concerned with...

  • as stated in Section 11.212.2

There is no styling applied to the rendered examples above and so they appear according to your browser's default behaviour. Commonly inline del content is given a strike-through and inline ins content is underlined. Block level content, however, is sometimes not styled differently at all - it is therefore a good idea for the author to use CSS to explicitly style the changed content - for example one could make sure all deleted text, block and inline, is struck through and also given a pink background using the rule:
del, del * { text-decoration:line-through; background-color:#fcc }

Note on element placement

As with the ins element, one should make sure that the document would validate if the del element were removed and replaced with its content. It is less of an issue with del because presumably the document was valid prior to insertion of the del in the first place.

#REQUIRED Attributes

There are no #REQUIRED attributes on the del element.


Specific Attributes

Specific attributes of the del element are listed below:

From the Edit Module - the Element's own Module

cite [ type URI ]
URI which specifies a reason for the deletion
datetime [ type Datetime ]
When the deletion was made

Common Attributes

Common attributes of the del element are listed below:

From the Core Attribute Collection

class [ type NMTOKENS ]
One or more space separated classes
id [ type ID ]
A unique identifier for the element
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

From the Events Attribute Collection

All attributes in the Events Attribute Collection are supported:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Content Model

The Content Model for the del element is:

( #PCDATA | Flow.mix )*

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of del

Valid parents of del


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > del Element