HTML Tags

HTML <del> Tag

Topic: HTML5 Tags ReferencePrev|Next

Description

The <del> (short for delete) tag is used to markup a range of text that has been deleted from a document. Browsers will normally render the deleted text as strike-through text, however you can overwrite this using CSS text-decoration property.

The following table summarizes the usages context and the version history of this tag.

Placement: Block or inline, depending on the content
Content: Any block, inline, and text (but cannot contain block content when used as an inline element)
Start/End Tag: Start tag: required, End tag: required
Version: HTML 4, 4.01, 5

Tip: Also look at the counterpart of <del> tag; the <ins> tag, which is used to markup the inserted text in a document.


Syntax

The basic syntax of the <del> tag is given with:

<del datetime="datetime"> . . . </del>

The example below shows the <del> tag in action.

<h1>To Do</h1>
<ul>
    <li>Buy some cookies</li>
    <li>Do some cleaning</li>
    <li><del>Relaxation time</del></li>
    <li>Visit a doctor</li>
</ul>

Tag-Specific Attributes

The following table shows the attributes that are specific to the <del> tag.

Attribute Value Description
cite URL Specifies the URL of the document or message which explains the reason for the change in content.
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time when the change was made.

Global Attributes

Like all other HTML tags, the <del> tag supports the global attributes in HTML5.


Event Attributes

The <del> tag also supports the event attributes in HTML5.


Browser Compatibility

The <del> tag is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 7+

Further Reading

See tutorial on: HTML Text Formatting.

Related tag: <ins>.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties