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 trialArno Featherstone
206 PointsI'm stuck on the challenge of adding opening and closing script tags. Not sure what is required.
On the first of two challenges, I'm asked to add opening and closing script tags. My attempt was the example given earlier: <script src=.... and i passed on to the 2nd part of the challenge, to add a phrase "Warning!"...i attempted that as well, prefacing with <script> then alert(..... when i check my work it somehow invalidates the passing of step one. what happened?
<!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>
</body>
</html>
2 Answers
Antonio Paturzo
5,042 PointsMake sure you are putting your alert(); code in between the script tags like so: <script> alert("Warning!"); </script>. Hope this helps.
Arno Featherstone
206 PointsI'm stuck. here is a screenshot...i do not know what i'm doing wrong and this is the 2nd or 3rd iteration that i've tried.
<!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>alert("Warning!");</script> </script> </body> </html>
Arno Featherstone
206 Pointsthe comment is Bummer, looks like you didn't put the alert between the script tags...how else do i do that?