Advertisement
Home Open Editor ❯

HTML <script> defer Attribute

Example

<script src="demo-defer.js" defer></script>

Try this code ❯

Meaning

The defer attribute specifies that the browser might defer execution of the script enclosed by the <script> element.

Notes:


Standard Syntax

HTML: <script defer></script>

XHTML: <script defer="defer"></script>


Advertisement

Attribute Values

Value Description
defer This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
Home Open Editor ❯
Advertisement