title: Button to make text in the div bolded
body: <p>I'm pretty new with coding, so bear with me. I've got a button on a page that, if I press on it, should make the specific text bold. </p>
  
  <p>But for some reason it doesn't work and I have no clue why..</p>
  
  <p>Here is an example:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input type="button" class="btn" onclick="boldtext();" /&gt;
  &lt;br /&gt;
  &lt;div id="text"&gt;This is some text&lt;/div&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>function boldtext () {
  document.getElementById('text').style.fontWeight = 'bold';
  }
  </code></pre>
  
  <p>My problem is when I click on the button, nothing happens.</p>
  
  <p>Did I make a mistake somewhere? </p>