ins ElementThe ins element is declared by the XHTML 1.1 Edit Module
Elements in the Edit Module are:ins | del
The ins element is used to mark up content which has been inserted into the document
since the last version. See also the del element.
The cite attribute may be used to provide a
URI which gives the reason for the change
and the datetime attribute may be used to indicate
the date and time of the change. A title attribute
may also be added to provide a brief reason for the addition. No browser of which I am aware automatically
presents the value of either the cite or the
datetime attribute to the user. This means that,
to obtain this information, the user must either view the document's source code or use browser-specific methods of
retrieving the data - for example, in certain browsers (e.g. Firefox) right-clicking over the element and selecting Properties
will bring up this information. Alternatively, scripting may be used to render this content on the page.
ins and del are not routinely used on web pages
but are useful in specific circumstances, such as for draft specifications or legal documents, where
it is necessary to be able to tell at a glance what has changed since the previous version of
the document (and possibly also when and why).
Examples:
These examples render as:
This section is concerned with...
There is no styling applied to the rendered examples above and so they appear according to your browser's default
behaviour. Commonly inline ins content is underlined and inline del content is
given a strike-through. Block level content, however, is sometimes not styled differently at all - it is therefore a
good idea for the author to use CSS to explicitly style the changed content
- for example one could make sure all inserted text, block and inline, is underlined and also given a blue background using the rule:
ins, ins * { text-decoration:underline; background-color:#ccf }
Although the Content Model for ins theoretically allows the following code
(which will pass W3C Validation):
<p>The meeting took place at Head Office <ins><div>256 Big Cheese Road, Hippotown</div></ins> at 3:30pm on 14th March 2006.</p>
this is not a suitable use of the element. The general rule is that the document should
still validate after the ins element is removed and replaced by its content. In
the case of the last example, removing the ins element gives:
<p>The meeting took place at Head Office <div>256 Big Cheese Road, Hippotown</div> at 3:30pm on 14th March 2006.</p>
which is not valid XHTML 1.1, since div cannot be a child of
p.
There are no #REQUIRED attributes on the ins element.
ins element are listed below:cite [ type URI ]datetime [ type Datetime ]ins element are listed below:class [ type NMTOKENS ]id [ type ID ]style [ type CDATA ], from the Style Attribute Module (deprecated)title [ type Text ]xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Modulexml:lang [ type LanguageCode ]All attributes in the
Events Attribute Collection
are supported:onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup
ins element is:
See Content Model & Nesting for information about Content Model syntax and Nesting Groups.
insabbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1 - h6, kbd, p, pre, q, samp, span, strong, varadl, ol, ultablebutton, fieldset, form, input, label, select, textareaimgb, big, hr, i, small, sub, sup, ttmapnoscript, scriptdel, insbdoobjectrubyinsbodyabbr, acronym, address, blockquote, cite, code, dfn, div, em, h1 - h6, kbd, p, q, samp, span, strong, varadd, dt, licaption, td, thbutton, fieldset, form, label, legendb, big, i, small, sub, sup, ttmapnoscriptdel, insbdoobjectrb, rt