Add the necessary annotations to a good habit that must be responsible and moral models, which must be able to greatly improve the maintenance and readability of the code. First of all, you need to be familiar with the writing of HTML, CSS, JS comments:
HTML comment:<!-Note content->
CSS comment:// Note Content Comment (not recommended, because some browsers may not be compatible, there is no effect)
/*Note content*/ Multi -row annotation (recommended)
Javascript:// Note Content Slip Note
/*Note content*/ Multi -row annotation
Summarize:// Note content (inserted into single -line notes in CSS or JavaScript)
/*Note content*/ (insert multiple lines of comments in CSS or JavaScript)
Next is how to summarize the notes in these code. (According to personal habits, it may be different)
1. HTML annotationPosition to use:
1) Generally use behind some major node labels, such as:
<div class = wrap> <div class = main> ... </div> <!-Main end-> <!-- wrap end->
2) Use behind the end of the cycle, such as:
<ul class = list> <li> 111111 </li> <li> 222222 </li> <li> 333333 </li> </ul> <!-list loop->
All this is more convenient and clear when the program is nested. It is convenient for others to facilitate themselves. The procedure nested is messy. At that time, you need to modify it. It is also a very complicated process.
2. CSS annotationGenerally, it is used on the definition of a module style, which shows which module this style acts on, such as:
/*General-Comment*/. Comments {...}/*Album*/. Photo {...}/*Share*/. Share {...}/*voting*/. Vote {...} 3. JavaScript NoteGenerally adding a note to a function function, explaining the function, author, author information, and modification time of the function.
// ========================================= ======== // Trimming characters // Steepvi // RTX: ******** // 2010-10-14 // ========== ====================================
Finally, the comments are also generated by the characters. Therefore, when the page is published to the formal address, it is best to add a step -by -step optimization process.
The compression process is a non -inverse process, ensuring that the local and comments with comments are guaranteed, and the server is uploaded after compression. The file on the server is not used for local debugging.
The above is the summary of HTML, CSS, and JS annotation specifications introduced by Xiaobian. I hope it will be helpful to everyone. If you have any questions, please leave me a message. Xiaobian will reply to everyone in time. Thank you very much for your support for the VEVB Wulin website!