How to write comments in HTML?
Use the Syntax “<!– text –>”
For explaining the markup, comments are used in HTML
It will help to understand the document quickly and easily at the time of editing the source code.
Comments are not displayed by the browsers.
An HTML comment begins with <!–, and ends with –>.
See the Instance below:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Comments in HTML</title> </head> <body> <!-- This is a single line HTML comment --> <!-- This is an example of a HTML multi-line comment --> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>