Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Teacher Russell
Teacher Russell
16,873 Points

What are they asking for?

I don't know what else they're asking for.

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

</body>
</html>
shout.js

Rob Hudson
Rob Hudson
4,292 Points

You have two pairs of script tags bud. The one without the link to the file that you use first would enable you to write your JavaScript inside of that directly into the HTML document. The <script src> tag is a link to an external document that contains the JavaScript. Because you put your linked script inside the original script tags this will not work.

2 Answers

All you need to do is remove the <script></script> tags surrounding your script src tags. You also have a little typo at the end of your closing tag.

Charley Montgomery
Charley Montgomery
9,372 Points

You appear to have accurately understood what the question is asking. However, you made a small syntax error by including a " mark at the end of your closing script tag, example: </script">. This: <script type= "text/javascript" src="shout.js"></script> should work fine.