title: Difference between "click" and onclick
body: <p>What is the difference between click in</p>
  
  <pre><code>document.getElementById("myBtn").addEventListener("click", displayDate);    
  </code></pre>
  
  <p>and onclick in</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;h1 onclick="this.innerHTML='Ooops!'"&gt;Click on this text!&lt;/h1&gt;
  
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  
  <p>Are they both considered as events? Why can't we use click instead of onclick and visce versa?</p>