PSD to HTML conversion PSD to HTML conversion PSD2HTML.com with over 300 professionals takes the designs to HTML and beyond

Code Snippet

Home » Code Snippets » HTML » Comments in HTML

Comments in HTML

<div id="header">
   <p>Stuff</p>
</div> <!-- END div-header -->

The <!-- --> stuff is the HTML comment. It is a way to add notes into the code which will not display when the HTML is rendered by the browser. In the example above, to signify which opening div tag the closing tag was actually closing.

Subscribe to The Thread

  1. That’s awesome Bro, will this work as a comment box ?
    Much appreciated.

    Watkinsservices@live.com

    Thanks again,
    -Joe

  2. Grant says:

    Hey @Joshephy Watkins

    If you are talking about a comment box like what I typed this message in, it won’t. It will just put a note in the HTML code for you to use later (I usually go stuf…… To keep everything organized

  3. jim says:

    Seein how this works

  4. talal says:

    thanks it’s nice

  5. Freelancer says:

    Cool trick, I will def give it a try, thank you for sharing.

  6. jul says:

    thank u.

Speak, my friend

At this moment, you have an awesome opportunity* to be the person your mother always wanted you to be: kind, helpful, and smart. Do that, and we'll give you a big ol' gold star for the day (literally).

Posting tips:
  • You can use basic HTML
  • When posting code, please turn all
    < characters into &lt;
  • If the code is multi-line, use
    <pre><code></code></pre>
Thank you,
~ The Management ~