HTML-<del> Tag

Definition und Verwendung

<del> Die Markierung für gelöschten Text wurde aus dem Dokument entfernt. Der Browser markiert in der Regel den gelöschten Text mit einer Linie.

Tipp:Siehe auch zur Markierung eingefügter Texte: <ins>-Tag.

Siehe auch:

HTML DOM Referenzhandbuch:Del-Objekt

Beispiel

Beispiel 1

Text mit gelöschtem und neu eingefügtem Text:

<p>Meine bevorzugte Farbe ist <del>blau</del><ins>rot</ins>!</p>

Try It Yourself

Beispiel 2

CSS-Stile für <del> und <ins> verwenden:

<html>
<head>
<style>
del {background-color: tomatenrot;}
ins {background-color: yellow;}
</style>
</head>
<body>
<p>Meine bevorzugte Farbe ist <del>blau</del><ins>rot</ins>!</p>
</body>
</html>

Try It Yourself

Attribute

Attribute Value Description
cite URL Specifies the URL of the document, explaining the reason for the deletion/modification of the text.
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time when the text was deleted/modified.

Global Attributes

<del> The tag also supports Global Attributes in HTML.

event attributes

<del> The tag also supports Event Attributes in HTML.

Default CSS Settings

Most browsers will display the following default values <del> Element:

del {
  text-decoration: line-through;
}

Try It Yourself

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support