How to create hidden comments in HTML?

HTMLWeb DevelopmentFront End Technology

To create hidden comments in HTML, add <!--- tag and end it with -- >. Whatever comes inside it is hidden. These comments are beneficial for those who need to refer the code again, which allow them to easily understand the code.

Comments can be considered as a note to yourself, which also hides HTML code, so the browser doesn't display it.


You can try to run the following code to learn about hidden comments in HTML

Live Demo

<!DOCTYPE html>
<title>HTML Comments</title>
   <!-- This is a comment. -->
      <!-- This is a comment. -->
      This is demo text.
Updated on 15-Jun-2020 08:21:01