html5与VS,HTML5中的vs

我一直难以决定何时使用b以及何时使用span.

b元素的新语义看起来很模糊.

The b element represents a span of text to which attention is being

drawn for utilitarian purposes without conveying any extra importance

and with no implication of an alternate voice or mood

听起来就像你不能使用strong,em或i时使用的标签.

The b element should be used as a last resort when no other element is

more appropriate.

但是,当短语内容还没有适用的标签时,我们已经获得了span.

The span element doesn’t mean anything on its own… It represents its

children.

有一个示例用途列表

key words in a document abstract,product names in a review,

actionable words in interactive text-driven software,or an article

lede

但是我找不到将它们联系在一起的基本原则,而不是将它们塑造成大胆的. old spec甚至提到了风格:

The b element represents a span of text to be stylistically offset

from the normal prose [emphasis added]

样式是为CSS.我们还建议使用类来显示实际含义

authors can use the class attribute on the b element to identify why

the element is being used

这听起来好像使用太多,不能单独按标签分组.我也可以使用类来解释span的语义.

The span element… can be useful when used together with the global

attributes,e.g. class,lang,or dir.

例子

如果我想要这个:

Your score for CS 101 Final is 42%.

我写吗

Your score for CS 101 Final is 42%.

要么

Your score for CS 101 Final is 42%.

或者对于这个:

Answer: 42

可不可能是

Answer 42

要么

Answer 42

(它只是一个键值对,因此定义列表不适用.)

我不仅仅想知道各个例子的正确标签.我想知道为什么他们是对的.我用什么标准来决定b或span标签?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值