JavaScript is a most popular programming language. It is the language for websites and implemented as part of web browsers, so why it is called client side script.
Since javascript isn't HTML, you will need to let the browser know in advance when you enter javascript to an HTML page. This is done using the <script> tag. The browser will use the <script type="text/javascript"> and </script> to tell where javascript starts and ends. You can enter javascript in both the <head> and <body> sections of the document. In general however, it is advisable to keep as much as possible in the <head>section.
<html>
<head>
<title>My Javascript Page</title>
</head>
<body>
<script type="text/javascript">
document.write("Welcome to my world!!!");
</script>
</body>
</html>
| After editing Click here: |
Output:
|