HTML语义化标签(一)

2015-8-31来源:CSS教程人气:2972

HTML语义化标签(一)

总所周知,现在的网页是由HTML、CSS、JS三大元素组成,而HTML是其中最重要的部分,是整个网页的骨架,CSS和js在骨架的基础上进行相应的修饰,使得网页成为一个有血有肉,可以动的“人”。如果HTML设计不合理,则类似一个骨骼不健全的人,即使外表再怎么修饰,也掩盖不了他明显的缺陷。

HTML标签都是带有语义考虑的,例如table语义为“表格”、tr为“单元行”、td为“单元格”。判断一个网页标签语义是否良好的一个简单方位就是:“去掉样式,看网页结构是否良好有序,是否任然具有很好的可读性”。一个语义良好的页面,h标签应该是完整有序没有断层的,按照h1、h2、h3、h4这样依次排列下来。在工作中可以使用web Developer或者firebug进行查看。W3C的官方网站就是一个典型的语义良好的标榜,http://www.w3.org/。

以下是去掉样式的W3C的官网

ipZxWLAC9iAWSwbgwFjsxnZGMuWLSzJnvvDIz3zzLNpZFvWWPN5v+bllyyNZkbSvJ/vs813PAYAwAV4sn0AAICRAKoD4AqgOgCuAKoD4AqgOgCuAKoD4AqgOgCuwFT90akl3PLYtK3c8p3kX7QQf8dMN/9+Zxr/mH2Gezt5nizcu6Q7esz6QLOIH4dbHpkiXx6esuXhKVuy+JMAkAl41YkkKslF4UV1Of9Tyi99id3UY9bHKQ1PabvGcPLgoXyoDnINSVS3Y9Rj1kgrxueUJothnI38YoFi03C2wCJWS92mYpPHj0wpeSh/C10Q1UHuYVHdvuGPCZFZH581tnMySysImko7Kzb3WBPAidtEeLJQzx+cjKgOchC56uxjSEOubbTb195Ojd1OWaOqpdNITlVnA7i4sPEcqoNcxW5U1/eWDWIRW/s2Gw4qtzXVdbEPRlkenLzlwclQHeQapup2QqjUcE1BoFfd/iKtnHO1dGk8lwZzqdvcksWfBIBMYFE9rea6SmxplJa2uu04n7IRLoZxGr2p5NIquij5tydvpksWfxIAMkGKqC4N5mJznba9U9b20wrg9JnHhO43jeea1rg0gIueQ3WQe/BRXQzsYve4+O93Uq1sM3qrquiqTnX2X6ne9AHxWR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