└── README.md /README.md: -------------------------------------------------------------------------------- 1 | ###DOCTYPE 头部开始 2 | 3 | Bad: 4 | ``` 5 | 6 | ... 7 | 8 | ``` 9 | Good: 10 | ``` 11 | 12 | 13 | ... 14 | 15 | ``` 16 | ###不要用旧的 DOCTYPE 17 | 18 | Bad: 19 | ``` 20 | 22 | ``` 23 | Good: 24 | ``` 25 | 26 | ``` 27 | ###不要用 XML 声明 28 | 29 | Bad: 30 | ``` 31 | 32 | 33 | ``` 34 | Good: 35 | ``` 36 | 37 | ``` 38 | ###最好不要用字符引用 39 | 40 | Bad: 41 | ``` 42 |

Copyright © 2014 W3C®

43 | ``` 44 | Good: 45 | ``` 46 |

Copyright © 2014 W3C®

47 | ``` 48 | 49 | ###Escape &, <, >, ", and ' 可以用字符引用 50 | 51 | Bad: 52 | ``` 53 |

The "&" character

54 | ``` 55 | Good: 56 | ``` 57 |

The "&" character

58 | ``` 59 | ###Use named character references for control or invisible characters 60 | 61 | Bad: 62 | ``` 63 |

This book can read in 1 hour.

64 | ``` 65 | Good: 66 | ``` 67 |

This book can read in 1 hour.

68 | ``` 69 | ###注释的内容两边留个空格 70 | Bad: 71 | ``` 72 | 73 | ``` 74 | Good: 75 | ``` 76 | 77 | ``` 78 | 79 | ###不要忽略闭合标签 80 | Bad: 81 | ``` 82 | 83 | 84 | ... 85 | ``` 86 | Good: 87 | ``` 88 | 89 | 90 | ... 91 | 92 | 93 | ``` 94 | ###不要搞混空元素的格式 95 | Bad: 96 | ``` 97 | HTML Best Practices 98 |
99 | ``` 100 | Good: 101 | ``` 102 | HTML Best Practices 103 |
104 | ``` 105 | ###在标签里面和属性值里不要留空格 106 | Bad: 107 | ``` 108 |

HTML Best Practices

109 | ``` 110 | Good: 111 | ``` 112 |

HTML Best Practices

113 | ``` 114 | 115 | ###不要搞混大小写 116 | Bad: 117 | ``` 118 | General 119 | ``` 120 | Good: 121 | ``` 122 | General 123 | ``` 124 | 125 | ###不要混用引号标记 126 | Bad: 127 | ``` 128 | HTML Best Practices 129 | ``` 130 | Good: 131 | ``` 132 | HTML Best Practices 133 | ``` 134 | Don't separate attributes with two or more white spaces 135 | ###属性之间不要用两个空格隔开 136 | Bad: 137 | ``` 138 | 139 | ``` 140 | Good: 141 | ``` 142 | 143 | ``` 144 | 145 | ###省略布尔属性的值 146 | Bad: 147 | ``` 148 |