semantic html 语义化HTML

语义化HTML指的是,所有的HTML标签应该根据你的内容转化.而非外观.例如使用<strong>而不是<b>.许多类似的设计叫做,“sectioning elements”.

Diagram: <header>, <nav>, <article>, <aside>, <figure>, and <footer> elements in a typical web page

使用div的替代元素对于搜索引擎来说是比较友好的.对于维护网站也比较简单些.

Diagram: div soup (several gray <div> elements) compared to semantic markup (<header>, <article>, <figure>, and <footer> in different colors)

 

发表评论

邮箱地址不会被公开。