Scanner class Methods in Java

Comments in HTML

Comments in HTML

Comments are used to specify the code we use.It is helpful to use comments to make the things easier and efficient. By writing comments the code becomes easy to understand by other user.

The browser does not display comments,but they help document the HTML, and add descriptions, remainders, and other notes.

Syntax: <!--Your Comment goes here . It is a comment-->

Only one syntax is used in html to write comments. Single and multiple line comments both can be written in this syntax.

Example:

<html>
<head>
<title>First page</title>
</head>
<body>
<p>This is first paragraph.</p>
<hr />
<p>This is second paragraph.</p>
<!--This is a comment-->
</body>
</html>

Result:

In above example, browser does not display comment.

Comments