HTML Element: <ins>
[this page | pdf | back links]
The HTML <ins> element indicates text added
to a document. It is often used in association with the <del> element to
highlight modifications to text.
The
attributes it
can take (other than HTML global
attributes and HTML
event attributes) include:
Attribute
|
Description
|
More
|
cite
|
URL which
explains the quote / deleted / inserted text
|
Here
|
datetime
|
Date and time of
element
|
Here
|
To create or access such an element in JavaScript
see here. The
corresponding HTML DOM
object supports standard
DOM properties and methods, and additional properties with the same name and
meaning as the attributes of the underlying HTML element referred to above (with the datetime
property of the underlying element corresponding to the dateTime property of the DOM object). The default style
applicable to this element is shown here.
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head></head>
<body>
Created using HTML:<br>
<ins>inserted text</ins>
<br><br>Created using JavaScript:<br>
<span id="element"></span>
<script>
var x = document.createElement("INS");
x.textContent = "inserted text";
// or use var txt = document.createTextNode("inserted text");
// x.appendChild(txt);
document.getElementById("element").appendChild(x);
</script>
</body>
</html>
|
NAVIGATION LINKS
Contents | Prev | Next | HTML Elements