Authored by xuqi

html norm

@@ -13,23 +13,34 @@ @@ -13,23 +13,34 @@
13 ## 注释 13 ## 注释
14 * 为每个你创建的JS文件添加注释 14 * 为每个你创建的JS文件添加注释
15 ``` 15 ```
16 - /**  
17 - * 对文件实现功能的描述  
18 - * @date: 2016-11-11  
19 - * @author: name<emial@yoho.cn>  
20 - */ 16 +/**
  17 +&nbsp;* 对文件实现功能的描述
  18 +&nbsp;* @date: 2016-11-11
  19 +&nbsp;* @author: name<emial@yoho.cn>
  20 +&nbsp;*/
21 ``` 21 ```
22 * 为重要的函数添加注释 22 * 为重要的函数添加注释
23 ``` 23 ```
24 - /**  
25 - * 对函数功能的说明  
26 - * @params name paramType 参数描述  
27 - * @return name returnType 返回值描述  
28 - */ 24 +/**
  25 +&nbsp;* 对函数功能的说明
  26 +&nbsp;* @params name paramType 参数描述
  27 +&nbsp;* @return name returnType 返回值描述
  28 +&nbsp;*/
29 ``` 29 ```
30 * 为重要的代码、逻辑复杂的代码或者有特殊处理的代码添加注释 30 * 为重要的代码、逻辑复杂的代码或者有特殊处理的代码添加注释
31 ``` 31 ```
32 - // Your comments for the code 32 +// Your comments for the code
33 ``` 33 ```
34 * 减少不必要的注释 34 * 减少不必要的注释
35 - 类似于:进入循环,循环结束等垃圾话的注释请谨慎添加,大家都是程序员,都懂的  
  35 + 类似于:进入循环,循环结束等垃圾话的注释请谨慎添加,大家都是程序员,都懂的
  36 +
  37 +
  38 +## html
  39 +* 见名知意,不要有1,2,3这种名字出现
  40 +* class、id等属性命名为中划线分隔小写单词
  41 +* html中请不要出现不必要的嵌套以及不要将标签滥用,比如使用`a`标签作为不跳转的按钮的标签
  42 +* 属性按顺序出现:`id -> class -> name -> data-* -> src,for,type,href -> title,alt -> aria-*,role`
  43 +
  44 +## [js](./js.md)
  45 +
  46 +## [css](./css.md)