- JavaScript is case-sensitive. Thus, using DOCUMENT.WRITE instead of document.write will result in an error.
- Forgetting to include the quotes results in an error. The text needs to be surrounded by quotes and placed inside parenthesis.
-
<script language="JavaScript" type="text/javascript">
<!--
document.write("Your-name-here");
//-->
</script>
-
<script language="JavaScript" type="text/javascript">
<!--
document.write("It's a good day to die");
//-->
</script>
-
<script language="JavaScript" type="text/javascript">
<!--
document.write('He said, "Welcome to my world."');
//-->
</script>
Note: The double quotes are surrounded by single quotes.