HTML async attribute

HTML async attribute: This attribute can be defined as a “Boolean attribute”. It defines that the script will be executed asynchronously as soon as it is available. While this async attribute can be used only for external scripts.

HTML async attribute

And this attribute can be used only if the src attribute is present. And this async attribute has the element as a script.

Supported Browsers

This attribute can be supported by different browsers. They are as follows:



  • Google
  • Mozilla
  • Safari
  • Opera
  • Internet Explorer

Example:

<script src="demo_async.js" async></script>

Output:

Hello World!

Note: The async attribute of the script tag is not supported in Internet Explorer 9 and earlier versions.