title: How can I change the content of the "h1" tag of an html page using javascript?
body: <p>I need to change the content of all "h1" tags in my html file when the page load using javascript. </p>
  
  <p>So I write the following code </p>
  
  <pre><code>window.onload = function () {
      var h1html = document.createElement("h1");
      var h1htmltext = document.createTextNode("header 1");
  
      h1html.appendChild(h1htmltext);
  
      document.getElementsByTagName("h1").appendChild(h1html);
  };
  </code></pre>