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 trialTyler Hart
7,726 PointsOops! It looks like Task 1 is no longer passing.
I am not sure what I am doing wrong here. :(
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script alert("Hello");></script>
<script alert("Warning!");></script>
</body>
</html>
2 Answers
Robin Orellana
11,626 PointsTask one only asks you to add the script tags. You shouldn't try to add anything inside the tags. Also, the syntax goes between the opening and closing task when it is asked. Task 1
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script></script>
</body>
</html>
comment if you need help on task 2
Robin Orellana
11,626 PointsNo problem. Work hard
Tyler Hart
7,726 PointsTyler Hart
7,726 Points*Thank you for your help! Unfortunately, I am still receiving the same error message. Please let me know whats wrong with the task 1. I only get the error message after I try the 2nd task? Thank you again.
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JavaScript Basics</title> </head> <body> <script></script> <script> alert("Warning!");</script>
</body> </html>
Robin Orellana
11,626 PointsRobin Orellana
11,626 PointsYou have the syntax right. I believe the reason that it is giving you an error is because you are creating a new script tag and writing the alert there. You need to right it inside the original <script></script>
If you are still having problems after trying that then i will give you the code. I just don't want to give you the answer right away and keep you from figuring it out yourself.
So if it still gives you an error let me know
Tyler Hart
7,726 PointsTyler Hart
7,726 PointsThat worked !! Thank you again, I really appreciate it!