The XHTML WYSIWYG Editor For Desktop & Web Applications

ins

Definition

The ins element is used to mark up content that has been inserted into the current version of a document. The ins element indicates that content in the previous version of the document has been changed, and that the changes are found inside the ins element.

By default, most Web browsers render content found inside the ins element with underline formatting.

The ins element can be used as either a block element or an inline element. When used as a block element, the ins element can contain block elements, inline elements or text. When used as an inline element, the ins element can only contain inline elements or text.

Example

This example shows the ins element used as a block element, marking up an entire paragraph that has been added.

  1. <p>In 1994, five years after inventing the World Wide Web, Tim Berners-Lee ...</p>
  2. <ins>
  3. <p>The rapid expansion of the Web into every area of society led ...</p>
  4. </ins>
  5. <p><abbr>W3C</abbr> laid the foundations of today's Web with standards ...</p>

The following example shows the ins element used inline, to mark up changes made to text inside a paragraph.

  1. <p>The price of lemonade is <del>35</del><ins>25</ins>ยข per glass.</p>

Best practice

Comments can be added to the title attribute to explain why content was modified or new content added. Web browsers may display comments as tooltips when the cursor hovers over content that is marked up with the ins element.

Attributes

Advanced

cite
(URI) This attribute is intended to point to information explaining why content was changed or added. For example, this can be a URL leading to a Web page that contains such an explanation.
datetime
(Datetime) Date and time of the content change.

Common core attributes

class
(NameTokens) This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or set of class names. Multiple class names must be separated by white space characters. Class names are typically used to apply CSS formatting rules to an element.
id
(ID) This attribute assigns an ID to an element. This ID must be unique in a document. This ID can be used by client-side scripts (such as JavaScript) to select elements, apply CSS formatting rules, or to build relationships between elements.
title
(Text) This attribute offers advisory information. Some Web browsers will display this information as tooltips. Assistive technologies may make this information available to users as additional information about the element.

Common internationalization attributes

xml:lang
(NameToken) This attribute specifies the base language of an element's attribute values and text content.
dir

This attribute specifies the base direction of text. Possible values:

  • ltr: Left-to-right
  • rtl: Right-to-left

Common event attributes

onclick
(Script) A client-side script event that occurs when a pointing device button is clicked over an element.
ondblclick
(Script) A client-side script event that occurs when a pointing device button is double-clicked over an element.
onmousedown
(Script) A client-side script event that occurs when a pointing device button is pressed down over an element.
onmouseup
(Script) A client-side script event that occurs when a pointing device button is released over an element.
onmouseover
(Script) A client-side script event that occurs when a pointing device is moved onto an element.
onmousemove
(Script) A client-side script event that occurs when a pointing device is moved within an element.
onmouseout
(Script) A client-side script event that occurs when a pointing device is moved away from an element.
onkeypress
(Script) A client-side script event that occurs when a key is pressed down over an element then released.
onkeydown
(Script) A client-side script event that occurs when a key is pressed down over an element.
onkeyup
(Script) A client-side script event that occurs when a key is released over an element.

Common style attribute

style
(Text) This attribute specifies formatting style information for the current element. The content of this attribute is called inline CSS. The style attribute is deprecated (considered outdated), because it fuses together content and formatting.

Contains

See also