title: Clickable link within a clickable div, that voids parents's click event
body: <p>Is there a way to have a clickable <code>div</code> with a nested <code>&lt;a&gt;</code>, that doesn't execute the click event on the <code>div</code> when the <code>&lt;a&gt;</code> tag is clicked?</p>
  <p>Looking for a vanilla JS solution</p>
  <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>const div = document.querySelector('div');
  div.addEventListener('click', e =&gt; {
    this.console.log('clicked the div');
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>div {
    width: 300px;
    border: 2px solid green;
    padding: 1em;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt; 
  &lt;p&gt;This is a button&lt;/p&gt;
  &lt;a href="/" target="_blank"&gt;Link to somewhere else&lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>