Does anyone have any experience using the defer attribute in script? I am having trouble making it work.
When I load the below code in browser the html is not loading before script, as I would like it to. Please help.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Hey</title> <script src="main.js" defer></script> </head> <body> <div>Hi</div> </body> </html>