QP School
Exercise 0001 - Hello World in JavaScript within a HTML document - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: JavaScript Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=6)
+--- Thread: Exercise 0001 - Hello World in JavaScript within a HTML document (/showthread.php?tid=3359)



Exercise 0001 - Hello World in JavaScript within a HTML document - Qomplainerz - 04-10-2022

In order to write content in HTML documents we will need the document.write() function.

As usual I will take "Hello, World!" as example.


Quote:<!DOCTYPE HTML>

<html>

<head>
    <title>Hello World</title>
</head>

<body>

    <script>
        document.write("Hello, World!");
    </script>

</body>

</html>