title: Set value inside label using javascript
body: <p>I just stumbled upon a js project where I need to set the value inside a html label tag using javascript. I tried the follwing code but, for some reason its not working. any idea why? </p>
  
  <pre><code>&lt;label id="text"&gt;&lt;/label&gt;
  &lt;script&gt;
      document.getElementById('text').value = 'Hello World!';
  &lt;/script&gt;
  </code></pre>
  
  <p>any help would be greatly appreciated.</p>