Advertisement
Home Open Editor ❯

HTML <script> async Attribute

Example

<script src="demo-async.js" async></script>

Try this code ❯

Meaning

The async attribute specifies that the browser might perform the fetch or execution of the script to be asynchronously from other activity in the page.

The meaning of this attribute versus the defer attribute with remote scripts in particular is quite unclear.

This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

Notes:


Standard Syntax

<script async></script>


Advertisement

Attribute Values

Value Description
async This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
Home Open Editor ❯
Advertisement