1. Script를 head에 포함시키는 것
<!DOCTYPE html>
<html>
<head>
<meta charSet="utf-8"/>
<title>Document</title>
<script src="main.js"></script>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charSet="utf-8"/>
<title>Document</title>
</head>
<body>
<div></div>
<script src="main.js"></script>
</body>
</html>
3. head + async
<!DOCTYPE html>
<html>
<head>
<meta charSet="utf-8"/>
<title>Document</title>
<script async src="main.js"></script>
</head>
<body></body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charSet="utf-8"/>
<title>Document</title>
<script defer src="main.js"></script>
</head>
<body></body>
</html>
https://www.youtube.com/watch?v=tJieVCgGzhs&list=PLv2d7VI9OotTVOL4QmPfvJWPJvkmv6h-2&index=2