Browser support to JavaScript
It is possible that a browser do not support JavaScript (generally older versions of the browsers). In such cases JavaScript will be displayed as the content of the webpage as explained above. To prevent them from doing this and as a part of the JavaScript standard you should use the HTML comment tag to "hide" the JavaScript. For this you need to add an HTML comment tag (end of comment) after the last JavaScript statement.
E.g.
Note: In the above example the two forward slashes at the end of comment line (//) are the JavaScript comment symbol. This prevents JavaScript from executing the --> tag. In case browser does not support JavaScript, the JavaScript code will not be displayed in the webpage as it is written inside the HTML comment tag.
Using JavaScript and HTML together
As you have seen that you can easily embedded JavaScript in a HTML document. Whenever you need to write JavaScript code you need to use