JavaScript JavaScript Basics Introducing JavaScript Link to an External Script

Robin Smith
Robin Smith
1,429 Points

Don't remember this is the course where within body of HTML they are asking me to load js.shout. The question is below

There are two files: a web page, index.html, and a JavaScript file, shout.js. To run any programming in the shout.js file, you first need to load it into the index.html file. Add the required HTML to load the external JavaScript file into the web page. Make sure to add your code inside the <body> of the page.

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

1 Answer

Milan Pankhania
Milan Pankhania
3,734 Points

Try this:

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

<script src="shout.js"> </script>
</body>
</html>