<ins>

HTML <ins> Tag

The <ins> tag is used to define a part of the text which has been inserted into the document. In the browser, tag content is displayed as an underlined text, although this can be changed with the CSS text-decoration property.

The <ins> tag is usually used with the <del> tag, which contains the deleted part of the text. The content of this element is displayed as crossed out text.

Most screen reading technology doesn’t announce the existence of the <ins> tag in the default configuration. To announce it, you can use the CSS content property with the ::after and ::before pseudo-elements.

Syntax

Syntax

The <ins> tag comes in pairs. The content is written between the opening (<ins>) and closing (</ins>) tags.

Example of the HTML <ins> tag:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <p>She likes <del>violets</del> <ins>snowdrops</ins>․</p>
  </body>
</html>

Result

Example of the HTML <ins> tag with the CSS properties:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      ins {
        font-size: 16px;
        font-weight: bold;
        color: red;
      }
      ins::before {
        content: " - ";
        width: 1px;
      }
    </style>
  </head>
  <body>
    <p>
      <q>You only live once, but if you do it right, once is enough.</q>
      <ins>Mae West</ins>
    </p>
  </body>
</html>

Attributes

Attributes

AttributeValueDescription
citeURLIndicates the URL of the document, where it is explained why the text is edited or deleted.
datetimeYYYY-MM-DDThh:mm:ssTZDDefines the date and time of deleting the text.

The <ins> tag also supports the Global Attributes and the Event Attributes.



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部