Answers for "edit html javascript"

0

edit html javascript

<p id="p1">Hello World!</p>

<script>
document.getElementById("p1").innerHTML = "New text!";
</script>
Posted by: Guest on February-22-2021
1

change html element

element.innerHTML =  "<p>read this</p>"	Change the inner HTML of an element
element.style.color = "blue";			Change the style of an HTML element
element.setAttribute(important, "true")	Change the attribute value of an HTML element
element.important = "true"				Change the attribute value of an HTML element
Posted by: Guest on November-19-2020

Browse Popular Code Answers by Language