Html Comment

How to comment html code?

Explanation

In any programming language or in web display platform, comments are most important for clarity on the coding. Learn how to add comment in html using this simple tutorial. In HTML, the tags <!-- and --> are used to insert comments in the source code. Anything written inside this tag will be termed as comment and are not displayed in your browser output.

HTML Comment Tags

<!-- Write your comments here -->
Comments always help you make a clean and understandable HTML coding. Comments are also useful to provide notifications and reminders in HTML. Apart from readability comments are very useful in debugging HTML coding as commenting in HTML enables you to comment out HTML lines of code one at a time to search for errors. The example code helps you to know how to comment in html.

Example:



<h5>Welcome to hscripts.com!</h5><!-- This is h5 tag -->

Result :
Welcome to hscripts.com!

Ask Questions

Ask Question