FREE HTML CODE
Search HTML Code

HTML Comments Code

Example HTML Comments Code:

To hide text within your html codes, you simply surround it with opening and closing comment tags. The opening comment tag is <!-- and the closing tag is -->. Everything in between is hidden from the user (although they could still see it if they view the source code of the page).



<!--
The browser will hide this comment because it is surrounded by comment code.
-->
<p>The browser will display this comment because it is not surrounded by comment code.</p>


This results in:

The browser will display this comment because it is not surrounded by comment code.

You'll notice that the first comment was not displayed by the browser (because it was wrapped within the HTML comment code).
| More