Comments are those parts of HTML document that are ignored by every web browser.We generally add comments for simplicity from coders point of view so that we can understand what a particular HTML part is about.
Method of writting HTML comments
<!---- Place your comment here --->
Description of comments
<!---- Place your comment here ---->
<h3>This is heading.</h3>
<p>This is paragraph.</p>
This is heading.
This is paragraph.
Types of comments
- Valid Comments-comments written in way <!---- Your Code ----->
- Invalid Comments-comments leave some space before !.
- Conditional Comments-These comments describes such HTML documents that are executed by Internet Explorer only.
- Software program Comments