ins (HTML element)

Spec
Depr. Empty Version
No No HTML 4
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

<ins cite="uri" datetime="datetime">
</ins>

Description

The ins element is used to indicate a change to the document that saw the author insert content which wasn’t included in an earlier version. If you’re familiar with the Track Changes tool in Microsoft Word, you can think of ins as HTML’s slightly simplified equivalent.

ins can be used to identify anything from a specific word or phrase that’s been inserted (in which case the ins is deemed to be an inline element) to an entire block of content, which could include a number of nested block-level elements (in this case, the ins is deemed to be a block-level element).

The ins element has a counterpart in the del element, which is used to identify a deletion from a document.

Both elements have optional attributes that provide extra information about the change to the document, namely the cite and datetime attributes.

The example HTML above would render as shown in Figure 1.

Figure 1. A browser interpretation of the ins element Example of ins and del elements

Whether an ins element is determined to be inline or block-level depends on the context in which it’s used. If the ins is an immediate child of body (with a Strict Doctypes declaration), it’s a block-level element. If it’s a child of a p element, it’s deemed to be an inline element.

Note that a ins element can’t contain block-level child elements when it’s used in a context that would make it inline (for example, an ins contained inside a p can’t contain a block-level element).

Example

The following text was hastily revised, yet the author chose to identify what was changed:

<p>Bernie enjoyed nothing more than a <del
    datetime="2007-11-05T23:31:05Z">night out on the town at his
    favorite drag queen show</del> <ins
    datetime="2007-11-05T23:33:32Z">quiet night in with a warm cup of
    cocoa</ins></p>

Use This For …

This element can be applied to inline text content, or blocks of content.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

The ins element has good browser support; all the major browsers render inserted text with an underline (although this effect could be restyled using CSS as appropriate).

In this Section

User-contributed notes

There are no comments yet.

Related Products