Headings, Lines, Comments part 3

HTML Fundamentals
HTML Basics
Headings, Lines, Comments
45
3/3
               

Comments



The browser does not display comments, but they help document the HTML and add descriptions, reminders, and other notes.<!-- Your comment goes here -->
Example:
<html>
<head>
<title>first page</title>
</head>
<body>
<p>This is a paragraph </p>
<hr />
<p>This is a paragraph </p>
<!-- This is a comment -->
</body>
</html>
Try It Yourself

Result:
As you can see, the comment is not displayed in the browser.

There is an exclamation point (!) in the opening tag, but not in the closing tag.

Comments