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 trialTom Pieter
65 Pointssays i didnt call the alert function within the script.
Not sure what i did wrong here, it says the alert function isnt placed within the script.
<!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">
alert("Warning");
</script>
</body>
</html>
1 Answer
jacobproffer
24,604 PointsHey Tom,
Remove the src attribute from your script tag. There's no reason to have it for this challenge.
You should simply have:
<script>
alert('Warning!');
</script>
Andrew Rady
20,880 PointsAndrew Rady
20,880 PointsRemove the src,
You don't need too have a source tag in there if you are going to run java script on the html page