Path // www.yourhtmlsource.comReference → <ins>

<ins>


The <ins> element represents text that has been inserted into a document. It is commonly used for tracking changes, revision history, or showing updates to content. Browsers typically render inserted text with an underline, though this can be customized with CSS.

Clock This page was last updated on 2025-11-17



Syntax

<ins cite="URL" datetime="timestamp">inserted text</ins>

The element requires both opening and closing tags. It can contain both block-level and inline elements, making it versatile for marking up inserted content of any size.

Attributes

  • cite - A URL that points to a resource explaining why the text was inserted (e.g., meeting notes, changelog)
  • datetime - The date and time when the text was inserted, in ISO 8601 format (e.g., "2024-01-15T10:30:00Z")
  • Global attributes - The <ins> element supports all global attributes such as id, class, style, lang, and dir.

Examples

Simple Text Insertion

<p>The event will take place on <ins>Saturday</ins> at 3pm.</p>

With Timestamp and Citation

<p>Our office is located at <ins cite="relocation.html" datetime="2024-03-01T09:00:00Z">456 New Street</ins>.</p>

Combined with del for Corrections

<p>The price is <del>$50</del> <ins>$45</ins> per unit.</p>

Block-Level Insertion

<ins datetime="2024-02-20">
  <p>We now offer free shipping on orders over $100.</p>
  <p>This applies to all domestic orders.</p>
</ins>

When to Use

Use the <ins> element when:

  • Showing content that was added during revision
  • Tracking changes in legal or contractual documents
  • Displaying price updates or corrections
  • Documenting edits in collaborative writing
  • Creating accessible revision histories

Accessibility considerations:

  • Screen readers may announce inserted text differently, improving comprehension
  • Use the datetime attribute to provide machine-readable timestamps
  • The cite attribute provides context for why changes were made
  • Consider adding visible indicators beyond just underlines for better visibility
  • <del> - For marking deleted text (often used together with <ins>)
  • <s> - For text that is no longer relevant but not a document edit
  • <u> - For non-semantic underlining
  • <mark> - For highlighting text