Saturday, September 1, 2012

HTML comment lines and JavaScript comment lines

It is important to write comment lines to HTML files and JavaScript files for web designer. It can help web designers to well organize the code.
1. HTML comment line
start with <!-- (no space between <! and --), end with --> (it is OK to have space between -- and >)
This is HTML comment line

2. JavaScript comment line
single line comment starts with //
// This is JS single line comment

Multiple lines start with /* and end with */
This JS multiple line

For JavaScript document line, start with /** and end with */
  * This is function Helloworld()
 * @author Jiansen
  * @version 1.1.0

No comments:

Post a Comment