What are code comments? The function of code comments is to help programmers mark the purpose of the code. If you look at the code you wrote after a while, you can quickly remember the purpose of this code. Code comments not only make it easier for programmers to recall the purpose of previous code, but also help other programmers quickly understand the functions of your program, making it easier for multiple people to collaborate on developing web page code.
Syntax:
<!--Comment text-->
Example
<!-- Write your comments here -->
Comment: There is an exclamation point in the opening tag, but There is no closing tag.
The browser will not display comments, but they can help record your HTML document.
You can use comments to place notifications and reminders in HTML:
<!DOCTYPE html> <html> <body> <!--这是一段注释。注释不会在浏览器中显示。--> <p>这是一段普通的段落。</p> </body> </html>