change inner html in javascript code example Example: change text of element js Click to copydocument.getElementById("p1").innerHTML = "New text!";