text.innerhtml code example
Example 1: .innerhtml
// .innerHTML method is used to change the html contents of a DOM object
document.getElementById("demo").innerHTML = "Paragraph changed!";
Example 2: js innerHTML
document.getElementById("Test").innerHTML = "<p style='color:red;'>Test</p>";
Example 3: innerHTML
document.getElementById("Test").innerHTML = "<h1>Test</h1>";