The comment tag (
<!-- comment -->) is used to insert HTML code comments. It is a good coding practise so that both the coder and the reader can understand the code. The comment tag is useful during code debugging.
<!-- comment -->
In HTML single and multilines comments uses same syntax (<!–- -–>) difference is half part of the comment (”-–>“), is appended where the intended comment line ends.
HTML Comments Example Given Below:
<!DOCTYPE html><html><body><h1>Picallens</h1><p>This is picallens single-line comment</p><!-- This is heading tag --><p>This is picallens multi-line comment</p><!-- This ismulti-linecomment --></body></html>
Comments are the best way to make your code understandable. Make the habit of adding those in your code. In next lesson we will learn about HTML Elements in detail. Thanks for your Support!