Defer Attribute
An HTML attribute that allows a script file to load in parallel with HTML parsing, but delays execution until the DOM is fully constructed.
With <script src="..." defer>, the browser fetches the script in the background while continuing to parse HTML. Only after parsing completes does it execute the script. This is ideal for scripts that manipulate the DOM—they are guaranteed to find the DOM when they run, yet they don't block rendering.
Defer preserves execution order: if you have two deferred scripts, they run in the order they appear in the HTML. This differs from async, which runs immediately when ready, regardless of order. For classic jQuery-style setups, defer is usually the right choice.