Wednesday, March 17, 2021

HTML Comment Tag

   
HTML Comment Tag

Html Comment is used to comment on the code in the HTML file.

Html Comment is used to explain what that particular work does. It will be used for future use. If you are going to edit the code comment is useful for you.

The comment is also used to hide the particular code from the source code file. If no need that code means you can comment on the code.

HTML Comment Syntex:

<!-- Your Comment -->

You can also use this comment to comment on the JavaScript code on the HTML page. However, you can add the double slash at the end of the comment before the double dash.

Java Script Comment

How to comment any text in javascript code just use the // and add your comment. See the below example.

<script>
var lw = "labw3";
// I declared the Variable name lw
alert(lw);
</script>

No comments:

Post a Comment