js change h1 value
document.getElementById("yourH1_element_Id").innerHTML = "yourTextHere";
js change h1 value
document.getElementById("yourH1_element_Id").innerHTML = "yourTextHere";
how would you create a new h1 element with javascript
<!DOCTYPE html>
<html>
<body>
<p>Click the button to create a h1 element with some text.</p>
<button onclick="myFunction()">Click to create</button>
<script>
function myFunction() {
var myStyle = document.createElement("H1");
var myText = document.createTextNode(prompt("This is an example of text written in H1");
h.appendChild(myText);
document.body.appendChild(myStyle);
}
</script>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us