The defer attribute allows the browser to continue parsing HTML while the script is downloaded, executing the script only after the document has been parsed.