HTML does not allow you to place a comment inside a tag.
If you generate HTML code in a template / programming language, you can use its functions to comment on something.
For example, in the Template-Toolkit:
<input type='text' name='name' [%
or PHP:
<input type='text' name='name' <?php
If you use HTML 5, you can (as an ugly hack) use the data attribute to βcomment outβ all the attributes.
<input type='text' name='name' data-comment-id='name'>
source share