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
<!DOCTYPE html> <html> <head> <title>HTML Comments</title> </head> <body> <!-- This is a comment. --> <p> <!-- This is a comment. --> This is demo text. </p> </body> </html>