HTML DOM Script async Property Last Updated : 20 Jun, 2023 Comments Improve Suggest changes 1 Likes Like Report The DOM Script async property is used to set or return whether a script should be executed asynchronously or not. This property is used to reflect the async attribute. This attribute only works for the external script. There are the following ways that the external script could be executed: The script will be executed asynchronously with the rest of the page when async is present. This means while the page continues the parsing the time script will be executed.If the defer is present but async is not present then the script will be executed when the page has finished parsing.If both, async or defer is not present then the script is fetched and will execute immediately, even before the browser continues parsing the page. Syntax: It returns the async property.scriptObject.asyncIt is used to set the async property.scriptObject.async = true|false Property Values: It contains a Boolean value which specifies that whether the script should be executed asynchronously as soon as it is available, or not. True: It specifies that the script should be executed asynchronously.false: It specifies that the script will not be executed asynchronously. By default, it is set to false. Return Value: It returns a Boolean value that specifies whether the script should be executed asynchronously or not. Example: In this example, we will use the DOM Script async Property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Script async Property </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> DOM Script async Property </h2> <p id="p1">Hello World!</p> <script id="myScript" src="demo_async.js" async> </script> <!-- Button that trigger the Function --> <button onclick="myFunction()"> Click me! </button> <p id="demo"></p> <!-- Main Function --> <script> function myFunction() { let x = document.getElementById("myScript").async; document.getElementById("demo").innerHTML = x; } </script> </body> </html> Output: Supported Browsers: The browser supported by HTML DOM Script async property are listed below: Google ChromeInternet Explorer 10.0FirefoxSafariOpera Create Quiz Comment M manaschhabra2 Follow 1 Improve M manaschhabra2 Follow 1 Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Explore HTML BasicsHTML Introduction4 min readHTML Editors4 min readHTML Basics7 min readStructure & ElementsHTML Elements4 min readHTML Attributes7 min readHTML Headings3 min readHTML Paragraphs3 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks2 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables9 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms4 min readHTML5 Semantics5 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List5 min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like