HTML: How to Comment With Example

In this article HTML How to Comment we discussed How to comment out in HTML?, HTML comment syntax, and two or more examples where we use HTML comment in the document.

Basically, comments are helpful for web developers or designers to know about source code working which is encapsulated with some information about code using Comment Tag by any developer.

how to comment in html

Here are the details which we discuss in this article,

  • Major points about HTML Comment Tag
  • HTML: How to Comment with Example
  • Browser Support

Major points about HTML Comment Tag

  1. The <!--...--> is an HTML Comment Tag.
  2. When you place content or information between <!--...--> this tag browser would not show these pieces of information.
  3. Developers can also hide the script tag code using HTML comments.
  4. Comment out HTML allows developers to leave notes or information about source code.

Also Read: How to Include Comments in CSS

HTML: How to Comment with Example

The HTML comment encapsulate the piece of information by using comment tag.


Single Line Comment

Multiline Comment

Sometimes we need to comment out multiple lines or some lines of code, then we use multiline comment.

You can also comment out or hide script code which is define inside <script> tag.


Note: You may also see <comment> tag somewhere but that comment tag is not supported by modern browsers.

Supported Browsers

Chrome (1+)

Edge (All)

Firefox (1+)

IE (All)

Opera (All)

Safari (All)

Here is the complete explanation HTML Comment.

Also, Read

Happy Coding..!

Was this article helpful?
My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH, my native place in Odisha. I am a Web Programmer by profession and working on more than 50 projects to date. My passion is working on the web-based project using PHP and relate to all CMS and frameworks which is based on PHP.
Posts created 175

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top
mariobet - supertotobet - escort -

- milanobet giriş - gizabet giriş -
perabet giriş
- betkanyon giriş -

jojobet giriş

We are now accepting guest posting and creation of back-links.
This is default text for notification bar