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 Write Another Program

<script src="scripts.js"></script> <script alert("Warning!");></script> Task 1 won't work?

I'm not quite sure 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>
</head>
<body>
  <script src="scripts.js"></script>
  <script
          alert("Warning!");></script>
</body>
</html>

5 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! Just to be clear, there should be exactly one set of script tags in your code. The first set of <script> tags you have link to an external JavaScript file which likely does not exist in this context. This was not asked for by the challenge and including more than one set of script tags will cause the challenge to fail regardless of what is inside of them. You should only have the line provided by Calin Bogdan

Hope this helps! :sparkles:

Hello!

You have to put the code between the script tags, like so:

<script>alert("Warning!");</script>
Todd Anderson
Todd Anderson
4,260 Points

you don't need the <script> src=.... part fort his example. just <script>alert("Warning!")</script>

ohhhh okay thank you.

Todd Anderson
Todd Anderson
4,260 Points

Hi! You seem to have forgotten the closing > on your opening <script tag (just like this).

so it should look like:

<script> src="scripts.js"></script> <script>alert("Warning!");</script>

???