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
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).
ins element has a counterpart in the
del element, which is used to identify a
deletion from a document.
The example HTML above would render as shown in Figure 1.
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
contain a block-level element).
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.
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).