Jump to content

Recommended Posts

Posted

I am puttng this code:<html>

<head>

</head>

<body>

<script="javascript" type="text/javascript">

 

 

if (4<5){

 

document.write("nice job!");

}

 

else{

document.write("Ohhh.Sorry");

}

 

</script>

 

</body>

</html>

down and it displays it like its a text. What did i type wrong??(sorry if this is basic but i am just 12 years old and trying to learn)

Posted

Looks like your opening <script> tag has issues. All you need is this:

 

<script type="text/javascript">

 

No need for the '="javascript"' part.

 

(Welcome to the forum! :) )

thanks :clap:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...