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

chau mai, script tags.

its still not working for some reason. I can't get the console log to come up either. or paste lines of code. help

index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
  <script
          alert ("warning");




</body> 
</html>

1 Answer

Otec Perez Glass
Otec Perez Glass
7,678 Points

Hello Kim Dallas just remember that you will have to close the <script > tag and inside that you can place your code and at the end do not forget to close it </script>

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
      <script type="text/javascript"> // all your code  
      </script>
  </body>
</html>

Also if you don't close it is like you are using the alert as an attribute of the script tag when the reality is alert() is a function. hopefully that will help you if you have any questions let me know.