There is also a special kind of tag in HTML, the comment tag. If you need to add comment text to an HTML document that is easy to read and understand but does not need to be displayed on the page, you need to use comment tags.
Simple explanation:
The comment content is not displayed in the browser window, but is also downloaded to the user’s computer as part of the content of the HTML document and can be seen when viewing the source code.
Syntax format:
<! The shortcut keys are CTRL + / or CTRL + Shift + /Copy the code
Note Importance:
Comments are for people to see, to better explain what this part of the code does, the program does not execute this code
The team agreed upon
Generally used for simple description, such as some state description, attribute description, etc
Comment content is preceded by a space character, comment above the code to comment, a single line
Recommendation:
<! -- Comment Text --> <div>... </div>Copy the code
Is not recommended:
<div>... </div><! -- Comment Text --> <div><! -- Comment Text --> ... </div>Copy the code