Comments in HTML
The <!-- --> syntax is the HTML comment. This is the way to add your own notes into the code which will
not display when the HTML is rendered by the browser. It is also a good practice for web-developers to use the
comment tags to "hide" scripts from browsers without support for it (so they don't show them as a plain text).
[View All Snippets]
[View All Snippets]
Show Plain Text »
- <!-- This is a comment. Comments are not displayed in the browser. -->
- <div id="header">
- <p>Some text</p>
- </div> <!-- END div-header -->
- <script type="text/javascript">
- <!--
- function ShowMessage()
- {
- alert("Hello World!")
- }
- //-->
- </script>