HTML `<script>` tag attributes

These attributes can be used to control the execution timing of JS scripts in HTML:

<script src="script.js" ( async |  defer |  neither ) ></script>
  • async - script is executed at the same time as the page
  • defer - script is excecuted after the page finishes parsing
  • neither - script is executed immediately before page parse

source: w3schools

Related