不同的浏览器默认样式不一样,所以容易出现兼容性问题,每次写网页时都应该都网页的css或HTML标签进行初始化
这样可以节约代码,节约网页下载时间,是网页内容更加简洁,
大致需要初始化的地方有
H1-H4标签,table标签,文字大小,文字没有链接,超链接样式,DIV,居中,ol,ul,li,img等等的样式,
一些示例:
body,div,dl,dt,dd,ul,ol,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}body{background:#fff;color:#555;font-size:14px;font-family:Verdana,Arial,Helvetica,sans-serif;}td,th,caption{font-size:14px;}h1,h2,h3,h4,h5,h6{font-weight:normal;font-size:100%;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}a{color:#555;text-decoration:none;}a:hover{text-decoration:underline;}img{border:none;}ol,ul,li{list-style:none;}input,textarea,select,button{font:14px Verdana,Helvetica,Arial,sans-serif;}table{border-collapse:collapse;}html{overflow-y:scroll;}.clearfix:fater{content:".";dispaly:block;height:0;clear:both;visiblity:hidden;}.clearfix{*zoom:1;}