Return to Snippet

Revision: 65875
at February 3, 2014 20:40 by apphp-snippets


Initial Code
<!-- 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>

Initial URL
http://www.apphp.com/index.php?snippet=html-comments-tag

Initial Description
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).

Initial Title
Comments in HTML

Initial Tags
html

Initial Language
HTML