Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Basics (Retired) Introducing JavaScript Link to an External Script

Link to an external script

Where do i put the opening and closing script, because i tried that but i keep getting turn down

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

2 Answers

The HTML tag you need is the <script> tag. You have <shout> which does not exist. You've also got an equals sign inside your src attribute, which should not be there.

In the question shout.js was the external file I needed to link with the HTML file, but I don't know exactly where the scripts goes and the shout.js goes

You have it in the right place. I see you also wrote the name of the file as shouts.js instead of shout.js. That would prevent the file from loading. Most scripts should be inserted right before the closing <body> tag, just as you have it!