JavaScript Placement
<!DOCTYPE html>
<html>
<head> <title>Example</title> <script> // JavaScript code goes here
console.log("Hello, world!"); </script>
</head> <body> <h1>Hello, world!</h1> </body> </html><!DOCTYPE html>
<html>
<head> <title>Example</title> <script src="script.js"></script>
</head>
<body> <h1>Hello, world!</h1>
</body>
</html>Last updated