Code Snippets Gallery

Blog > Code Snippets > HTML > Comments in HTML Submit one!

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.

Responses

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

    Watkinsservices@live.com

    Thanks again,
    -Joe

Leave a Comment

Remember:
  • Be nice.
  • Wrap all code in <pre> and <code> tags. (single or multiple lines) and escape it first (turn <'s into &lt;'s).
  • You may use regular HTML stuff like <a href="">, <em>, and <strong>