script async Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:script

Description

The async attribute is a boolean attribute to set if the script will be executed asynchronously.

The async attribute is only for external scripts.

A script that will be run asynchronously as soon as it is available:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="p1">Hello World!</p>
<script src="demo_async.js" async></script>

</body><!--   w w  w . j  a v  a2  s  .c o  m-->
</html>

Related Tutorials