defer attribute

A script attribute that downloads the script in the background and runs it, in document order, only after the HTML has finished parsing.

In more detail

defer keeps the parser moving and preserves order between scripts, which suits code that needs the full DOM. Module scripts behave like defer by default.

Related terms

Taught in

References