Loading Please Wait...
HTML comments are useful in the documentation purposes of the HTML code such as about the working of code, what it does, etc.
The browser ignores the comments and does not display them. It is only for the developers to use for a better understanding of the HTML code.
To add comment in the HTML document, use the following syntax
<!-- Your comment goes here -->
To add more information about the code such as modifications in the future, notifications, alerts, reminders, etc. in a single line.
<!DOCTYPE html>
<html>
<body>
<!-- Below code display a simple paragraph -->
<p>This is simple paragraph</p>
<!-- Some interesting content come in the future -->
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<!--
This is a
multi line
comment.
-->
<p>This is simple paragraph</p>
</body>
</html>
Sometimes we need to hide some content for testing or any other purpose. HTML comments come in handy for this.
<!DOCTYPE html>
<html>
<body>
<p>This paragraph display</p>
<p>This is <!-- simple --> paragraph</p>
<p>This paragraph display too</p>
<!--
<p>This is not display</p>
<a href="https://lynxsia.com/" >Same for this link</a>
-->
</body>
</html>
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved