Easy Tutorial
❮ Tag Picture Att Fieldset Name ❯

HTML <script> async Attribute

HTML <script> Tag

Example

The script will run asynchronously once it is available:


Browser Support

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the async attribute.

Note: Internet Explorer 9 and earlier versions do not support the async attribute for the <script> tag.


Definition and Usage

The async attribute is a boolean attribute.

The async attribute executes the script asynchronously once it is available.

Note: The async attribute is only for external scripts (only when the src attribute is used).

Note: There are several ways to execute external scripts:


Differences Between HTML 4.01 and HTML5

The async attribute is new in HTML5.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the async attribute must be defined as <script async="async">.


Syntax

❮ Tag Picture Att Fieldset Name ❯