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
Property | Explanation |
---|---|
cite | It returns and alter the value of the cite attribute of an ins element in an HTML document. |
dateTime | It 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
<!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.