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

HTML reference manual

HTML tag大全

HTML: <del> тег

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 in the <del> tag as strike-through text. You can use a companion tag called <ins> 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 newly inserted parts:

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


In this HTML5 document example, we created a <del> tag containing the text 'This text has been deleted', and the deletion reference is https://ru.oldtoolbag.com. Most browsers will display the text within the strike-through as the <del> tag, but you can change it with CSS.

Browser compatibility

IEFirefoxOperaChromeSafari

Все основные браузеры поддерживают тег <del>.

Описание и руководство по использованию тега

Элемент <del> HTML расположен внутри тега <body>.

Советы и注意事项

Вы также можете посмотреть <ins> Как тег определяет сначала вставленный текст.

Тег <del> определяет удаленный текст в документе.

Тег <del> используется для отслеживания изменений в документе и выделения удаленного содержимого. Тег <del> также может использоваться в инструменте сравнения для отображения удаленного исходного кода.

Совет:Использование тегов <del> и <ins> вместе для описания обновлений и исправлений в документе. Браузеры обычно добавляют тень удаления к удаленному тексту и подчеркивание к новому тексту.

Различия между HTML 4.01 и HTML5

Нет.

Свойство

СвойствоЗначениеОписание
citeURLОпределяет URL документа, который объясняет причину удаления текста.
datetimeYYYY-MM-DDThh:mm:ssTZDОпределяет дату и время удаления текста.

Глобальные свойства

Поддержка тега <del> Глобальные свойства HTML.

Свойства событий

Поддержка тега <del> События свойств HTML.