0
Is this script correct?
alert("This is an alert box!"); <script type=âtext/javascript"> document.write(âHello world <br/>â); document.write(âGoodbye worldâ) Please tell me im new
2 Answers
+ 7
Also, in HTML 5, the default script type is Javascript, so you can just drop the type attribute for cleaner code.
+ 6
The alert should be placed inside the script tag, and you seem to forget to close the script tag with its pairing </script>. And a semicolon after the "Goodbye world".
<script type=âtext/javascript">
alert("This is an alert box!");
document.write(âHello world <br/>â);
document.write(âGoodbye worldâ);
</script> <!-- You forgot this -->
Hth, cmiiw