title: External JS not linking to HTML
body: <p>I have a very simple directory structure with an <code>index.html</code> file and a <code>main.js</code> file at the same level and no other files/folders. But I'm unable to link this js file in my index.html. </p>
  
  <p>I have posted the contents of both files below, and the expected behaviour is to have a simple alert pop-up.</p>
  
  <p><strong>Here is my HTML File:</strong> </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8" /&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt;
          &lt;link rel="stylesheet" href="css/main.css" /&gt;
          &lt;script type="text/javascript" scr="main.js"&gt;&lt;/script&gt;
          &lt;title&gt;External JS Issue&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          Some Content Here.
      &lt;/body&gt;
  &lt;/html&gt;
  
  </code></pre>
  
  <hr>
  
  <p><strong>Here is my JS File:</strong><br>
  <code>alert("If you can read this, it worked!");</code></p>
  
  <hr>
  
  <p>However, if I include this JS line of code and put it directly inside my <code>index.html</code>, it works fine.<br>
  Here are the screenshots:  <br><br>
  index.html:<br>
  <a href="https://i.stack.imgur.com/lib5W.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lib5W.jpg" alt="index.html"></a></p>
  
  <p>main.js:<br>
  <a href="https://i.stack.imgur.com/TpzY7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TpzY7.jpg" alt="main.js"></a></p>
  
  <p>Browser Screenshot with External JS(NOT Working):<br>
  <a href="https://i.stack.imgur.com/15lp6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/15lp6.png" alt="Browser Screenshot with External JS(NOT Working)"></a></p>
  
  <hr>
  
  <p>index.html with inline JS:<br>
  <a href="https://i.stack.imgur.com/4QbWm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4QbWm.jpg" alt="index.html with inline JS"></a></p>
  
  <p>Browser Screenshot with Inline JS(Working):<br>
  <a href="https://i.stack.imgur.com/9zbCn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9zbCn.png" alt="Browser Screenshot with Inline JS(Working)"></a></p>