HTML Comment Tags
In Html code, we can add comments. comments are not displayed in the browser. the syntax is
<!-- Write your comments here -->
! – exclamation point
- The information will be written in <!– Information — >. (browsers won’t show this information).
- developers use this tag to leave notes about their code to indicate necessary changes for the future.
Example:
<!DOCTYPE html>
<html>
<body>
<!-- This is a comment -->
<p> Welcome to PrepareExams.Com </p>
<!-- Comments are not shown in the browser -->
</body>
</html>
Multiline Comments
We can comment multiple lines by the beginning tag as you can see in the given example below.
<!DOCTYPE html>
<html>
<head>
<title>HTML - Multiline Comments (PrepareExams) </title>
</head>
<body>
<!--
This is a multiline comment and we are learning
How to use multiline comment in HTML code.
-->
<p> Note goes here.....</p>
</body>
</html>