async Attribute
The async attribute is a boolean attribute. When present, it specifies that the script will be executed asynchronously as soon as it is available. It is only used for external js files or in other words external scripts.
Three ways for external js file executions are:-
if async is present then the script is executed asynchronously with the rest of the page.
if async is absent and defer is present then the script will execute after the page has finished parsing.
If both are absent then the script is fetched and executed immediately.
Used With:-
ElementsAttribute scriptasync
Syntax:-
Its syntax is:- < element async