好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Web语义化标准解读_html/css_WEB-ITnose

原文: https://github测试数据/kuitos/kuitos.github.io/issues/33

15年年末写了篇关于 BEM方法论(实践上内容并不是原BEM)的文章,文末给自己挖了个坑说要聊聊web语义化,跳票至今:joy:。16年第一篇用来填坑好了!

什么是语义化

The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries. --Wikipedia

语义化Web具备让数据跨终端共享/重用的能力。

对于HTML体系而言,Web语义化是指使用语义恰当的标签,使页面有良好的结构,页面元素有含义,能够让人和机器都容易理解。

语义化说起来好像都懂,但是实际情况并不是那么乐观。

再谈各种所谓的CSS设计模式

OOCSS (Object Oriented CSS)

...a CSS “object” is a repeating visual pattern, that can be abstracted into an independent snippet of HTML, CSS, and possibly JavaScript. That object can then be reused throughout a site. — Nicole Sullivan

... primary info

目标:

减少对HTML结构的依赖

增加CSS class重复性的使用

SMACSS(Scalable and Modular Architecture for CSS)

...an attempt to document a consistent approach to site development when using CSS. — SMACSS

一种css架构风格

BEM(Block,Element,Modular)

The BEM approach ensures that everyone participating in the development of a website is working with the same codebase and using the same terminology — BEM Methodology

        ...        ...        ...       

与SMACSS类似

METACSS | ATOMCSS (原子CSS)

查看更多关于Web语义化标准解读_html/css_WEB-ITnose的详细内容...

  阅读:30次