Join WhatsApp

Join Now

Join Telegram

Join Now

HTML Comment Tags

By Akash Saharan

Published on:

HTML Comment Tags

HTML Comment Tags

In Html code, we can add comments. comments are not displayed in the browser. the syntax is

<!-- Write your comments here -->

! – exclamation point

  • The information will be written in <!– Information — >. (browsers won’t show this information).
  • developers use this tag to leave notes about their code to indicate necessary changes for the future.

Example:

<!DOCTYPE html>
<html>
<body>

<!-- This is a comment -->
<p> Welcome to PrepareExams.Com </p>
<!-- Comments are not shown in the browser -->

</body>
</html>

Multiline Comments

We can comment multiple lines by the beginning tag as you can see in the given example below.

<!DOCTYPE html>
<html>

   <head>  
      <title>HTML - Multiline Comments (PrepareExams) </title>
   </head> 
	
   <body>
      <!-- 
         This is a multiline comment and we are learning
         How to use multiline comment in HTML code.
      -->
      
      <p> Note goes here.....</p>
   </body>
	
</html>
---Advertisement---

Related Post

HTML Tables

Published On:

HTML – Images

Published On:

HTML Text Formatting Elements: Full List

Published On:

HTML Styles: How to Set color, font, size, and more

Published On:

HTML Introduction – HyperText Markup Language

Published On:

Leave a Comment