商品单元的标签语意化
五一放假,没事酒吧闲聊。一群同学太敬业,聊着聊着就聊到了页面,聊到我们网站上那不计其数的商品单元。戏言F刚刚做的频道商品单元一堆span。F反驳说之前见过我的做法,用dfn,del,ins等,但除了见我这么做,没见过其他人这么做过。之后的一番讨论不断深入,最后F和我都觉得用dfn,del,ins等是部分合理的,而且引申到几种不同的商品单元格式。
偷闲记下一些东西。
先引用w3c.org对”dfn”,”del”,”ins”,”q”,”span”的一些解释:
DFN:DFN Indicate that this is the defining instance of the enclosed term.
DEL and INS:INS and DEL are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document .
Q:Q is intended for short quotations (inline content) that don’t require paragraph breaks.
SPAN: Span in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents, it define content to be inline but impose no other presentational idioms on the content.
按照标签定义,我们把商品单元解释成一条完整的语句:

<dfn>商品名称</dfn>是图片为<img />,曾经的<del>市场价为55元</del>,修改后正确的<ins>拍拍价为29.5元</ins>,点击这里可以<strong>立即抢购</strong>的商品。

<dfn>商品名称</dfn>是图片为<img />,其中有项内容为<span>拍拍价29.5元</span>,点击这里可以<strong>查看详情</strong>的商品。

<dfn>店铺名称</dfn>是图片为<img />,引用了一小段<q>店铺说明</q>,购买按钮为<button></button>的店铺。
虽然自我感觉丫丫得很有理,但还是忍不住去看淘宝有啊易趣amazon&gmarket等等,遗憾的发现大家都做得不一样,每行文字有用<em>的,或者用<div>的,还有些用<del>标市场价之后却没有出现<ins>,总之还是没有能够找到合理的参照物……
