Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <del> Tag

The <del> tag marks text that has been deleted from a document.

This tag is used to track document changes and revisions.

By default, this element is rendered as strike-through text.

Example

#

This <del> element marks 'Van Gooch' as deleted.
The correct spelling has been added.

This painting is by Van Gooch Van Gogh.

<p>This painting is by <del>Van Gooch</del> <ins>Van Gogh</ins>.</p>
del = deleted

Using <del>

The <del> tag is used to track document changes and revisions.

This tag is commonly used together with the <ins> tag which marks inserted text.

Both are designed to track document changes.

Attributes for <del>

This table lists the <del> tag attributes.

Attribute Value Description
datetime date-time Specifies the date and time the text was deleted.
Enter this format: YYYY-MM-DDThh:mm:ssTZD.
cite URL References a document that shows why the text was deleted.
id   identifier Defines a unique identifier for the element.
class   classnames Sets one or more CSS classes to be applied to the element.
style   CSS-styles Sets the style for the element.

For additional global attributes see our global attributes list.


Did you know?

Did you know?

Changing the line-through color of the <del> tag

By default, the <del> line-through color is the same as the text.

This color can be changed using the text-decoration-color CSS property.

Deleted text with a red line-through.

And this other painting is by Pal Cesane Paul Cézanne.

<p>
  And this other painting is by 
  <del style="text-decoration-color: red;">Pal Cesane</del> 
  <ins style="text-decoration:none;">Paul Cézanne</ins>.
</p>

For details on the text-decoration-color property, see our CSS text-decoration-color Reference Guide.


Text Tags

The <del> tag is part of a group of tags that are used to create and format text documents. This group is referred to as the Text tag group. Together, they allow you to create comprehensive HTML text documents.

A list of text tags.

Element Description
<h1>-<h6> Defines text headings in 6 different sizes
<p> Creates a paragraph
<span> Container for one or more inline text elements
<br> Creates a line break
<sup> Specifies superscript text
<sub> Specifies subscripted text
<u> Specifies underlined text
<i> Specifies italic text
<b> Specifies bold text
<em> Marks text that needs emphasis
<strong> Indicates text that is important or with high urgency
<del> Defines deleted text
<ins> Defines inserted text
<ruby> Represents a small annotation with pronunciation of text
<kbd> Specifies keyboard input, such as, CTRL or ALT
<wbr> Specifies a preferred word-break location for long words

Browser support

Here is when <del> support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like


Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides