When we check the source code of many websites, we will find many annotations, especially the Sina comment tags are used to insert comments in the source documents. The annotation text is generally used as a reference for programmers, especially large-scale and multi-person website source codes. If there is no comment, the code written by programmer A cannot be allowed to be recognized by programmer B. In this way, if programmer A leaves, the code he writes will be difficult to maintain. And with comments, understanding the code will be easier.
Sina.com source code HTML comments (green text is comments)
HTML comments are ignored by the browser, and HTML comments are written directly inside the website source code and will not be displayed on the front end. As shown in the above picture, the green part is all comments and will not be displayed. Through the green text above, we can know what this code means and the beginning and end of the code. The HTML comment format is as follows:
Copy the code