script element

The HTML element that loads or contains JavaScript for the page.

In more detail

A plain script tag without defer, async or type="module" is parser-blocking: the HTML parser stops until the script has downloaded and run, because the script might change the document. Adding defer or async lets the download happen in the background.

Related terms

Taught in

References