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 trialDallas Caldwell
Courses Plus Student 438 Points<script src="scripts.js"></script> <script alert("Warning!");></script> Task 1 won't work?
I'm not quite sure what i'm doing wrong
<!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
Treehouse TeacherHi 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!
Calin Bogdan
14,921 PointsHello!
You have to put the code between the script tags, like so:
<script>alert("Warning!");</script>
Todd Anderson
4,260 Pointsyou don't need the <script> src=.... part fort his example. just <script>alert("Warning!")</script>
Dallas Caldwell
Courses Plus Student 438 Pointsohhhh okay thank you.
Todd Anderson
4,260 PointsHi! You seem to have forgotten the closing > on your opening <script tag (just like this).
Dallas Caldwell
Courses Plus Student 438 Pointsso it should look like:
<script> src="scripts.js"></script> <script>alert("Warning!");</script>
???
Todd Anderson
4,260 PointsYou're welcome. :)