English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Le tag <del> en HTML est utilisé pour marquer le texte supprimé du document mais conservé pour afficher l'historique des modifications du document. Traditionnellement, les navigateurs affichent le texte trouvé dans le tag <del> en texte barré. Vous pouvez utiliser un tag appelé <ins> pour marquer le texte inséré dans le document. Ce tag est également appelé élément <del>.
Un texte avec une partie supprimée et une partie insérée :
!doctype html> <html> <head> <meta charset="UTF-8> <title>HTML5 Utilisation du tag <del> (Tutoriel de base sur oldtoolbag.com)</title> </head> <body> <h1>Titre 1</h1> <p><del cite="https://fr.oldtoolbag.com">Ce texte a été supprimé</del> mais ce texte n'a pas été supprimé.<ins>rouge</ins></p> </body> </html>Voyons si ça marche ‹/›
Dans cet HTML5Dans l'exemple de document, nous avons créé un tag <del> contenant le texte "Ce texte a été supprimé" et avons utilisé comme source de suppression https://fr.oldtoolbag.com. La plupart des navigateurs affichent le texte dans le tag <del>, mais vous pouvez le modifier avec CSS.
IEFirefoxOperaChromeSafari
All major browsers support the <del> tag.
The HTML <del> element is located within the <body> tag.
You can also check <ins> How the tag marks the first inserted text.
The <del> tag defines deleted text in the document.
<del> tags are used to track changes to the document and highlight the content that has been deleted from the document. <del> tags can also be used in difference tools to display source code deletions.
Tip:Using <del> and <ins> together to describe updates and corrections in the document. Browsers usually add a line through the deleted text and a line under the newly inserted text.
None.
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the URL of a document that explains the reason for the deletion of the text. |
datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the text was deleted. |
Support for <del> tag Global attributes of HTML.
Support for <del> tag HTML event attributes.