The following javascript codes will generate "Hello world!" content wrapped with <p> <div> tags next to where the client-side javascript source file <script> tag is. Have these javascript codes in external js file let say "hello.js":
var script = document.getElementsByTagName('script');
var newdiv = document.createElement('div');
script = script[script.length - 1];
form.innerHTML = '<p>Hello world!</p>';
script.parentNode.insertBefore(newdiv, script.nextSibling);
... and define this "hello.js" file anywhere you want the content to appear inside your <body> tag.
<script src="hello.js" type="text/javascript"></script>
Next to where you defined the js source file, its should generate the following output:
<div><p>Hello world!</p></div>