<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="renderer" content="webkit" /> <meta name="keywords" content="" /> <meta name="description" content="" /> <title>浙江爱信诺前端规范</title> <link rel="stylesheet" href="style/base.css"/> <link rel="shortcut icon" href="images/favicon.ico"/> </head> <body> <!-- header --> <div class="g-header"> </div> <!-- /header --> <!-- content --> <div class="g-content"></div> <!-- /content --> <!-- footer --> <div class="g-footer"></div> <!-- /footer --> <script type="text/javascript" src="script/jquery.js"></script> </body> </html>
<body> <!-- 侧栏内容区 --> <div class="g-sidecol"> <div class="m-side"> <div class="m-sidein"> <!-- 热门标签 --> <div class="m-sideblk"> <div class="m-hd3"><h3 class="u-title">热门标签</h3> </div> ... </div> <!-- /热门标签 --> <!-- 最热TOP5 --> <div class="m-sideblk"> <div class="m-hd3"><h3 class="u-title">最热TOP5</h3> <a href="#" class="f-fr">更多»</a></div> ... </div> <!-- /最热TOP5 --> </div> </div> </div> <!-- /侧栏内容区 --> </body>
如果可以写成<div></div><div></div>那么就不要写成<div><div></div></div>
比如<div><h2></h2></div>已经能满足要求,那么就不要再写成<div><div><h2></h2></div></div>
比如不要出现这种情况:<div class="class1 class2 class3 class4"></div>
比如在这样一个列表中,li标签中的itm应去除:<ul class="m-help"><li class="itm"></li><li class="itm"></li></ul>