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

HTML reference manual

HTML tag大全

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 within the <del> tag 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>Use of HTML5 del tag (Basic Tutorial Website oldtoolbag.com)</title>
</head>
<body>
<h1>Heading 1</h1>
<p><del cite="https://it.oldtoolbag.com">This text has been deleted</del> but this text has not.<ins>red</ins></p>
</body>
</html>
Test to see ›/›


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

Browser compatibility

IEFirefoxOperaChromeSafari

Tutti i browser principali supportano l'etichetta <del>.

Definizione e istruzioni per l'uso delle etichette

L'elemento <del> HTML si trova all'interno dell'etichetta <body>.

Suggerimenti e avvertenze

Puoi anche guardare <ins> Come etichetta indica il testo inserito prima.

L'etichetta <del> definisce il testo rimosso dal documento.

L'etichetta <del> viene utilizzata per tracciare le modifiche al documento e evidenziare il contenuto rimosso dal documento. L'etichetta <del> può anche essere utilizzata in strumenti di differenza per visualizzare il codice sorgente rimosso.

Suggerimento:Utilizzare <del> e <ins> insieme per descrivere aggiornamenti e correzioni del documento. I browser di solito aggiungono una linea di cancellazione al testo cancellato e una linea sottolineata al testo inserito.

Differenze tra HTML 4.01 e HTML5

Nessuna.

Proprietà

ProprietàValoreDescrizione
citeURLDefinisce l'URL di un documento che spiega il motivo per cui il testo è stato rimosso.
datetimeYYYY-MM-DDThh:mm:ssTZDDefinisce la data e l'ora in cui il testo è stato rimosso.

Proprietà globali

Supporto <del> etichetta Proprietà globali HTML.

Proprietà degli eventi

Supporto <del> etichetta Proprietà degli eventi HTML.