How do we add a comment in HTML code?

HTMLWeb DevelopmentFront End Technology

The HTML <comment> tag allows authors to comment their HTML code.

It is recommended to use <!--....--> to comment your tags. This tag is compatible with all browsers.

Note − The <comment> tag deprecated in HTML5. Do not use it.

Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML <!--....--> Tag</title>
   </head>
   <body>
      <comment>This is a commented line in IE</comment>
      <!-- This is a commented line supported by almost every browser.
         It will not appear in output as its a comment.
      -->
   </body>
</html>
raja
Published on 13-Mar-2018 13:02:37
Advertisements