English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <del> Tag

The HTML <del> tag is used to mark text that has been deleted from the document but retained to display the document change history. Traditionally, browsers will display the text found within <del> tags as strikethrough text. You can use the accompanying <ins> tag to mark new text inserted into the document. This tag is also commonly referred to as the <del> element.

Online Example

A text with deleted and inserted parts:

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 Using <del> Tag (Basic Tutorial Website oldtoolbag.com)</title>
</head>
<body>
<h1>Heading 1</h1>
<p><del cite="https://www.oldtoolbag.com">This text has been deleted</del> but this text has not.<ins>red</ins></p>
</body>
</html>
Test to see ‹/›


In this HTML5In the document example, we created a <del> tag containing the text 'This text has been deleted' and set the deletion reference to https://www.oldtoolbag.com. Most browsers will display the text within <del> tags in strikethrough, but you can change it with CSS.

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the <del> tag.

Definition and Usage of Tags

The HTML <del> element is within the <body> tag.

Tips and Notes

You can also see <ins> How tags mark the text that was inserted first.

The <del> tag defines deleted text in the document.

The <del> tag is used to track changes to the document and highlight the content that has been deleted from the document. The <del> tag can also be used in difference tools to display source code deletions.

Tip:When used together with <ins>, the <del> and <ins> tags describe updates and corrections in the document. Browsers typically add a line through the deleted text and underline the newly inserted text.

HTML 4.01 with HTML5differences

None.

Attribute

AttributeValueDescription
citeURLSpecifies a document's URL that explains why the text was deleted.
datetimeYYYY-MM-DDThh:mm:ssTZDSpecifies the date and time when the text was deleted.

Global attributes

Support for <del> tag Global attributes of HTML.

Event attributes

Support for <del> tag HTML event attributes.