HTML DOM Ins Object



The HTML DOM Ins Object represent the <ins> element of an HTML document.

Create ins object

Syntax

Following is the syntax −

document.createElement(“INS”);

Properties of ins object

PropertyExplanation
citeIt returns and alter the value of the cite attribute of an ins element in an HTML document.
dateTimeIt returns and alter the value of the cite attribute of an ins element in an HTML document.

Let us see an example of ins object−

Example

 Live Demo

<!DOCTYPE html>
<html>
<style>
   body {
      text-align: center;
      background-color: #fff;
      color: #0197F6;
   }
   h1 {
      color: #23CE6B;
   }
</style>
<body>
<h1>DOM ins Object Demo</h1>
<button onclick="createIns()" class="btn">Create an ins object</button>
<script>
   function createIns() {
      var insElement = document.createElement("INS");
      insElement.innerHTML = 'I\'m a <ins> element in HTML';
      document.body.appendChild(insElement);
   }
</script>
</body>
</html>

Output

Click on “Create an ins object” button to create an ins object.


Advertisements