JavaScript JavaScript Basics Introducing JavaScript Link to an External Script

Kim Dallas
Kim Dallas
11,461 Points

I did exactly what you suggested Kris.

I have tried everyone's suggestion. it's still staying something is wrong. I don't understand what i'm doing wrong.

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<body>
  <script src="shout.js"<>/script>
    </body>
    </html>
shout.js
alert ("I did it!");

1 Answer

Sam Gord
Sam Gord
14,056 Points

Hey there , the problem is that you haven't closed your <head> tag!

<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
  <script src="shout.js"<>/script>
</body>
</html>

compare your code to this corrected version of mine, you'll get it ;)

happy coding