title: How to set the color of H1 using javascript?
body: <p>I wanted to know that how can i set the color of the text enclosed in H1 tag using javascript. For this i cant use css.</p>
  
  <p>The script i tried was this-</p>
  
  <pre><code>document.h1.style.color="#fff"
  </code></pre>
  
  <p>But this doesnt work. Pls help.</p>
  
  <p>EDIT-</p>
  
  <p>I really couldnt find anything suitabble to this. Actually i do not know much about javascript and have encounter a problem where i have to use javascript to set the color of H1.</p>
  
  <p>Now how can i do the same thing but with the p tag.</p>