HTML Comments

HTML comments are text, they are only shown in codes and not rendered by the browser.


Why use HTML Comments?


HTML comments help both beginners and experienced web developers to easily organize their codes.

They act like sticky notes in HTML file.


How to write HTML Comments?


An HTML Comment start with 

<!-- and ends with -->.

It looks like this:

<!-- comments go here -->


Example :

<p> 

    Sentences shown on browsers.

    <!-- single -line comment -->

</p>


<p>

    Sentences shown on browsers.

    <!-- this is a multi-line comment

        comments go here

        comments go here   -->

</p>


Post a Comment

Thanks for comment.

Previous Post Next Post