<!DOCTTYPE html>Here is how it looks on the browser:
<!--Example 1: Hello.html -->
document.writeln(" <h2>Hello World!</h2>");
Statements end with a semicolon. The write method writes a line of characters in the HTML5 document to be displayed by the browser. The alert method, which can be written without the prefix window displays an alert box with a message in it. The escape sequence \n indicates the new line and the plus sign + indicates joining two strings. A comment line is preceded with a double forward bar "// but multiline comments use delimiers and hence start with the delimiter /* and finish with */.
For more details, please contact me here.