<form>FORM
  <div>DIV
    <p><input type="button" value="Click Me"/></p>
  </div>
</form>
  form, div {
    margin: 10px;
    border: 1px solid blue;
  }
  for(let elem of document.querySelectorAll('*')) {
    elem.addEventListener("click", e => alert(`Capturing: ${elem.tagName}`), true);
  }
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.