HTML Comments are not a part of our Coding . In every language, We have comments. Normally comment are for developer or codder to understand the code or you can say , it is part of our documentation.
We can use the comment to understand our code and it help the programmer and when one programmer switch the job from one company to another , Then the new programmer will come , then he start working on the project , then it help him to understand the code.
<HEAD><TITLE>Comment in HTML</TITLE></HEAD>
<H1>This is a Heading Tag.</H1>
<!–<p>Comments of paragraph tag. </p>–>
In the result , we can’t see the paragraph tag. Because it is comment , browser , compiler , Interpreter does not recognize the comment.
Comments are not necessary in the Program however to understand the flow of programs , the programmer can include HTML Comments also in the program.
Comments are to be inserted by the programmer. It is useful for documentation. The Compiler doesn’t execute comments lines, this we can say that comments are not the part of executable program. The user can frequently use any number of comments that can be placed anywhere in the Program.