Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How exactly does <script defer=“defer”> work?\\n
The defer attribute is used to specify that the script execution occurs when the page loads. It is used only for external scripts and is a boolean attribute.
Example
The following code shows how to use the defer attribute:
<!DOCTYPE html> <html> <body> <script src="defer_test.js" defer></script> <p>The external file added will load later, since we're using defer</p> </body> </html>
Advertisements
