HTML <ins> Tag
Definition und Verwendung
<ins>
Der Tag definiert den Text, der in das Dokument eingefügt wurde. Der Browser fügt in der Regel einen Unterstrich unter den eingefügten Text hinzu.
Hinweis:Bitte vergleichen Sie mit <del> Gemeinsam verwendet, um Aktualisierungen und Korrekturen im Dokument zu beschreiben.
Siehe auch:
HTML DOM Referenzhandbuch:Ins-Objekt
Beispiel
Beispiel 1
Text, der die gelöschten und neu eingefügten Teile enthält:
<p>Meine Lieblingsfarbe ist <del>blau</del><ins>rot</ins>!</p>
Beispiel 2
CSS wird verwendet, um die Stile von <del> und <ins> zu setzen:
<html> <head> <style> del {background-color: tomato;} ins {background-color: yellow;} </style> </head> <body> <p>Meine Lieblingsfarbe ist <del>blau</del><ins>rot</ins>!</p> </body> </html>
Attribute
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the URL of the document that explains the reason for inserting or changing the text. |
datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the text is inserted or changed. |
Global Attributes
<ins>
The tag also supports Global Attributes in HTML.
Event Attributes
<ins>
The tag also supports Event Attributes in HTML.
Default CSS Settings
Most browsers will display the following default values <ins>
Element:
ins { text-decoration: underline; }
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |