.innerhtml
// .innerHTML method is used to change the html contents of a DOM object
document.getElementById("demo").innerHTML = "Paragraph changed!";
subodhk
// .innerHTML method is used to change the html contents of a DOM object
document.getElementById("demo").innerHTML = "Paragraph changed!";
document.getElementById("Test").innerHTML = "<p style='color:red;'>Test</p>";
<box>
<p>Hello there!</p>
</box>
<script>
const box = document.querySelector('box');
// Outputs '<p>Hello there!</p>':
console.log(box.innerHTML)
// Reassigns the value:
box.innerHTML = '<p>Goodbye</p>'
</script>
<button onclick="this.innerHTML = Date()">The time is?</button>
const content = element.innerHTML;
element.innerHTML = htmlString;
table.innerhtml