How to use Comments in HTML   

HTML comments begins with <!-- and ends with -->. <!-- Comment --> element is not displayed by the web browser, but they can help user to understand the HTML code by writing this to an HTML page.

0 363 Technology | Html
Wed Dec 26 , 2018

HTML comments are visible to anyone that views the page source code, but are not displayed when HTML page is rendered by a web browser.


Syntax

<!-- Comment -->

Example


<html>
<body>
<!-- Comments will not displayed in web browser -->
<h1>HTML </h1>
<p>HTML stands for Hyper Text Markup Language.</p>
<!-- Comments will not displayed in web browser  -->
</body>
</html>


Output

HTML

HTML stands for Hyper Text Markup Language.



Subscribe & Get Regular Updates On Your E-mail