Created
January 29, 2014 10:14
-
-
Save apphp/8685076 to your computer and use it in GitHub Desktop.
Comments in HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). | |
Source: http://www.apphp.com/index.php?snippet=html-comments-tag | |
<!-- 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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment