English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
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.
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.
IEFirefoxOperaChromeSafari
Tutti i browser principali supportano l'etichetta <del>.
L'elemento <del> HTML si trova all'interno dell'etichetta <body>.
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.
Nessuna.
Proprietà | Valore | Descrizione |
---|---|---|
cite | URL | Definisce l'URL di un documento che spiega il motivo per cui il testo è stato rimosso. |
datetime | YYYY-MM-DDThh:mm:ssTZD | Definisce la data e l'ora in cui il testo è stato rimosso. |
Supporto <del> etichetta Proprietà globali HTML.
Supporto <del> etichetta Proprietà degli eventi HTML.