HTML <ins>タグ
例
削除された部分と新しい挿入された部分を含むテキスト:
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
定義と使用法
タグは、<ins>
ドキュメントに挿入されたテキストを定義します。ブラウザは通常、挿入されたテキストに下線を付けます。
ヒント:削除されたテキストをマークアップするには、 <del>タグも確認してください。
ブラウザのサポート
Element | |||||
---|---|---|---|---|---|
<ins> | Yes | Yes | Yes | Yes | Yes |
属性
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies a URL to a document that explains the reason why the text was inserted/changed |
datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time when the text was inserted/changed |
グローバル属性
<ins>タグは、HTMLのグローバル属性もサポートします。
イベント属性
この<ins>
タグは、HTMLのイベント属性もサポートしています。
その他の例
例
CSSを使用して<del>と<ins>のスタイルを設定します。
<html>
<head>
<style>
del {background-color:
tomato;}
ins {background-color: yellow;}
</style>
</head>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
</body>
</html>
関連ページ
HTML DOMリファレンス:Insオブジェクト
デフォルトのCSS設定
ほとんどのブラウザは<ins>
、次のデフォルト値で要素を表示します。
例
ins {
text-decoration: underline;
}