How to changes the <h1> (page header) tag with JavaScript

1 Answer

0 votes
<!DOCTYPE html>
<html>

<head></head>

<body>

<h1 id="h1-id">First Header</h1>
<script>

document.getElementById("h1-id").innerHTML = "Second Header";

/*
run:

Second Header in <h1>  

*/

</script>

</body>

</html>

 



answered Jul 6, 2015 by avibootz
...