Start by adding java script to a web page. JavaScript in the web lives
inside the HTML document and must be inserted between <script>and
</script>tags:
JavaScript can be placed in the HTML page’s <body>and
<head>sections.
This prints “hello world” to the browser. The document.write()function writes the
word “hello world”
Creating your first
JavaScript
<script>
…
</script>
<html>
<head></head>
<body>
<script>
document.write(“Hello World”);
</script>
</body>
</html>

Creating your first java script

  • 1.
    Start by addingjava script to a web page. JavaScript in the web lives inside the HTML document and must be inserted between <script>and </script>tags: JavaScript can be placed in the HTML page’s <body>and <head>sections. This prints “hello world” to the browser. The document.write()function writes the word “hello world” Creating your first JavaScript <script> … </script> <html> <head></head> <body> <script> document.write(“Hello World”); </script> </body> </html>