title: How can I fade a div out when a button is clicked?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function animateHelloworld() {
    document.querySelector('#hello-world').style.display = "block";
    document.querySelector('#button').style.display = "none";
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#hello-world {
    display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="hello-world"&gt;
    Hello world
  &lt;/div&gt;
  &lt;div id="button"&gt;
    &lt;button onclick="animateHelloworld()"&gt;press me&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I want the div and the button fade away as I press the button thank you.
  I am a begginer thanks in advance :)</p>