What is the purpose of including the defer attribute in a <script> tag?

A). To execute the script asynchronously.

B). To delay script execution until after the document is parsed.

C). To specify the scripting language used in the script.

D). To load an external script file.

Which scenario is ideal for using the async attribute in the <script> tag?

A). When the script must be executed in a specific order.

B). When the script contains critical functionality that should not be delayed.

C). When the script can be executed independently and does not depend on other scripts or document elements.

D). When the script must be executed after the document is parsed.

How does the browser handle the execution of a <script> tag with the defer attribute?

A). It delays script execution until after the document is parsed, maintaining script order.

B). It executes the script as soon as it's available, even if the document is still parsing.

C). It waits for user interaction before executing the script.

D). It prevents the script from executing until the user interacts with the page.

Which of the following is true about inline JavaScript code execution?

A). It always executes before external JavaScript files.

B). It executes simultaneously with external JavaScript files.

C). It executes after external JavaScript files.

D). It depends on the order of inclusion in the HTML document.